Modding Animals Into Hunting Unlimited 2010

User avatar
NmanMETA
Posts: 48
Joined: 25 Apr 2021 03:56
Location: The Good 'Ol USA!

Modding Animals Into Hunting Unlimited 2010

#1 Post by NmanMETA » 14 Oct 2021 05:52

I know it's awful desperate of me to come here looking for help on modding Hunting Unlimited 2010, but here's the thing-

People have done custom weapons, custom maps are possible, calls and other various items have been modded into the game.

My question is, can a 19th animal be modded into the game? I am aware that animals can be texture hacked and using Zmodeler2, the models can indeed be changed and swapped; as an attempt at a proof of concept, I copied the model and behavior options for the Cougar, modified the textures, and I've poked around just about everywhere I can, I made the tag icons, and when I compress everything in WinRAR, the base.scs file loads up and functions just fine (as evidenced by a few other texture and music changes), however my 19th animal (a jaguar) does not appear. It's not in the animal selection menu, not even a greyed out icon, it's just the normal 18 animals that have been there for 12 years. It's unavailable from the user mission creator as well.

I even went as far as setting it all up in the automat folder texture wise for the jaguar, absolutely everything is there functionally. I'm just curious if maybe I did something incorrectly there, and that's preventing it from showing up, however I can't imagine that would be the case, as that's all texturing paths if I'm right; by that logic, if it was done wrong, that should mean the Jaguar's textures would be wrong.

However, it doesn't appear at all and I'm at a total loss as to why. My fear is that the issue is sealed within some code that I have no way of reading/editing unless I reverse engineer it, and that sounds awfully... difficult, we'll say. That said, I'm positive it can be done, I'm that close, I just need a way to get it to appear in the menus.

Like I said, functionally it's all done to the best of my ability (granted, for what it's worth). I did read the rules and unfortunately, I can't distribute my base.scs file here as that would probably fall under "mod distribution", therefore breaking forum rules, so you'll just have to trust me that I have my models, textures and behaviors done, but if anybody knows how to get a 19th animal to appear in game, do drop that info here, it would be beyond appreciated.

Worst case scenario, I'll buy HU4 and compare the two-- I'm thinking that, maybe, if I can figure out how they added the Red Deer, Black Bear, Turkey, etc. to the game, I can mimic that in order to add 19, then 20, and so on. And once I figure that out, I'll make it publicly accessible, just not here.

############################################
PROGRESS UPDATE
############################################

So, to divulge my process here, I made a series of stopgap base.scs files to begin with, uncompressed versions with their various edits and such. Everytime I got a fully functioning one that didn't crash, I made a new one.

To make sure I knew my whole process, I decided to take on a slightly different project, to add 6 new animals to the game (that in all honesty are just texture edits that take up new slots.)

The first issue, which I mentioned originally was that the animals would not appear when it came time to select your species. I knew I had to mess with some menu code but I didn't know how to go about doing that, but I want to start with how I added the animals to the game in general.

First was the models. I copied the model folders from various animals, renamed them, and edited the textures. I then editted the animal.pba, as well as the various .pmd and .tobj files in the model folders to have the correct paths and such, and I made sure to do EACH ONE without any short cuts.

The textures were .dds format, which I was able to edit in full using Paint.NET, which made life nice and easy on that front.

However I wasn't done yet, I still had to do all of the icon files, which might be a problem area, but I'll get there. The icons I made were simply editted versions of existing animal icons, saved under different names (coyote icon is an editted wolf icon, for example, saved as a_coyote.dds). I'll use the Coyote as an example for this thread for consistency's sake. I even made differently named greyed out versions and glow effects for all animals I plan to add.

Anywho, texturing/graphical stuff out of the way, it was time for behavioral stuff as well as the meat of the code. My first stop was the game.def file, located in base:\def\, and the bottom section of that file contains data for every animal. I'll say, I only understand this stuff on a basic level, I poked around the basedefs file (I'll get there) and know things like how to do free hunt animal counts, herd counts and such, however I didn't feel adventurous enough to try making them from scratch so the bulk of them are copied.

For the coyote, I copied this:
def blackbear:/species_kind {
animal_db:"/script/animal_db/blackbear.def"
name:"@@df_spc_blackbear@@"
slot_empty:"/material/ui/icon/a_blackbear_empty.mat"
slot_glow:"/material/ui/icon/a_blackbear_glow.mat"
slot_full:"/material/ui/icon/a_blackbear.mat"
index:"14"
species_interaction:"7,2,7,5,7,7,-1,5,5,5,1,-1,3,0,7,7,1,5"
fade_hunger:"2"
fact_hunger:"12"
root_rotation:"< 0 90 90 >"
maximal_herd_size:"2"
trail_type:"grizzly_trail"
spoor_dist:"0.80"
desc0:"@@df_desc0_blackbear@@"
desc1:"@@df_desc1_blackbear@@"
score_max:"30"

# has tough skin
male_impact_absorption:"3.1"
female_impact_absorption:"3.1"
young_impact_absorption:"3.1"

male_impact_damage:"0.9"
female_impact_damage:"0.9"
young_impact_damage:"0.9"

male_travel_damage:"2.0"
female_travel_damage:"2.0"
young_travel_damage:"2.0"

pc_head_instant:"true"
pc_head_vital:"true"
pc_lungs_travel_damage:"2.0"
pc_head_travel_damage:"3.0"

def carcass:/carcass_base {
attract00:"grizzly:0.3:food"
attract01:"cougar:0.3:food"
attract02:"wolf:0.3:food"
attract03:"lion:0.3:food"
repell00:"all:0.2:food"
}

def boar:/species_type {
name:"@@df_gen_boar@@"
model:"/models/animals/blackbear/animal.pba"
variant:"boar"
scale:"1.0"
places_category:"bear"
gender:"1"
scoring_type:"size"
score_range:"19:29"
weight_range:"250:850"
s_specific:"/sounds/animals/an_gr_boar.ogg"
call_back:"0.40"
dangerous:"true"

def ai_presets {
def default:/ai_type {
name:"@@em_ps_default@@"
val_attack_probability:"0.100"
fade_stress:"0.1"
}
def ai_insensitive:/ai_type {
name:"@@em_ps_insensitive@@"
fact_hunter:"1.000"
fade_hunter:"0.200"
fade_stress:"0.05"
fact_hunter_perception:"0.200"
}
def ai_normal:/ai_type {
name:"@@em_ps_calm@@"
fade_stress:"0.1"
}
def ai_sensitive:/ai_type {
name:"@@em_ps_sensitive@@"
fact_hunter:"2.000"
fade_hunter:"0.050"
fade_stress:"0.2"
fact_hunter_perception:"0.700"
val_attack_probability:"0.100"
}
def ai_aggressive:/ai_type {
name:"@@em_ps_aggressive@@"
val_aggression:"0.300"
val_attack_probability:"0.200"
fade_stress:"0.1"
}
def ai_dumb:/ai_type_dumb {
}
}
}

def sow:/species_type {
name:"@@df_gen_sow@@"
model:"/models/animals/blackbear/animal.pba"
variant:"sow"
scale:"0.8"
places_category:"bear"
gender:"2"
scoring_type:"size"
score_range:"15:24"
weight_range:"115:450"
s_specific:"/sounds/animals/an_gr_sow.ogg"
call_back:"0.30"
dangerous:"true"

def ai_presets {
def default:/ai_type {
name:"@@em_ps_default@@"
val_attack_probability:"0.100"
fade_stress:"0.1"
}
def ai_insensitive:/ai_type {
name:"@@em_ps_insensitive@@"
fact_hunter:"1.000"
fade_hunter:"0.200"
fade_stress:"0.05"
fact_hunter_perception:"0.200"
}
def ai_normal:/ai_type {
name:"@@em_ps_calm@@"
fade_stress:"0.1"
}
def ai_sensitive:/ai_type {
name:"@@em_ps_sensitive@@"
fact_hunter:"2.000"
fade_hunter:"0.050"
fade_stress:"0.2"
fact_hunter_perception:"0.700"
val_attack_probability:"0.100"
}
def ai_aggressive:/ai_type {
name:"@@em_ps_aggressive@@"
val_aggression:"0.300"
val_attack_probability:"0.200"
fade_stress:"0.1"
}
def ai_dumb:/ai_type_dumb {
}
}
}

def cub:/species_type {
name:"@@df_gen_cub@@"
model:"/models/animals/blackbear/animal.pba"
variant:"cub"
scale:"0.5"
places_category:"bear"
gender:"3"
scoring_type:"none"
weight_range:"55:215"
s_specific:"/sounds/animals/an_gr_sow.ogg"
dangerous:"false"

def ai_presets {
def default:/ai_type {
name:"@@em_ps_default@@"
fade_stress:"0.1"
}
def ai_insensitive:/ai_type {
name:"@@em_ps_insensitive@@"
fact_hunter:"1.000"
fade_hunter:"0.200"
fade_stress:"0.05"
fact_hunter_perception:"0.200"
}
def ai_normal:/ai_type {
name:"@@em_ps_calm@@"
fade_stress:"0.1"
}
def ai_sensitive:/ai_type {
name:"@@em_ps_sensitive@@"
fact_hunter:"2.000"
fade_hunter:"0.050"
fade_stress:"0.2"
fact_hunter_perception:"0.700"
}
def ai_aggressive:/ai_type {
name:"@@em_ps_aggressive@@"
val_aggression:"0.300"
val_attack_probability:"0.100"
fade_stress:"0.1"
}
def ai_dumb:/ai_type_dumb {
}
}
}
}
Within that, I change every instance of "blackbear" to "coyote", and furthermore, I realized that on the animal list, the Black Bear is the 14th listed from left to right. To ensure this wasn't a coincidence, I checked all other animals to find that this did indeed determine list order. As such, I listed the Coyote at 20 (I did 5 animals other than the Coyote), and it was at this point I got really excited. Also, I wanted to ask a side question, what is "species interaction"? I did not alter any of these values, however I have backups of the file in case I decide to edit, however I'd like to ask what exactly those values mean, and what they change? Can/should I edit these, or will that cause issues?

With what I had learned from various test attempts, my next stop was local.def, located in base:\scripts\en\. Now, I saw I can change the genders and such, and this file defined a LOT of calls that are made from the esc files in the base:\ui folder, which is kinda fun to play around with (you can screw with menu links and make never-ending prank loops, where the only escape is Alt+F4 XD.

In local.def, it contained SO MANY of the calls that I couldn't for the life of me find, so much item info, so much that I could edit and play around with, so much that I understood, the .def files are such a treat to find, honestly :D. It contained a section about 1/3 of the way down which contained this information.
df_spc_wtail:"White-tailed Deer"
df_spc_buffalo:"Buffalo"
df_spc_elk:"Elk"
df_spc_pronghorn:"Pronghorn Antelope"
df_spc_mule:"Mule Deer"
df_spc_goat:"Mountain Goat"
df_spc_bighorn:"Bighorn"
df_spc_grizzly:"Grizzly Bear"
df_spc_blackbear:"Black Bear"
df_spc_moose:"Moose"
df_spc_boar:"Wild Boar"
df_spc_kudu:"Kudu Antelope"
df_spc_cougar:"Cougar"
df_spc_lion:"Lion"
df_spc_elephant:"African Elephant"
df_spc_turkey:"Wild Turkey"
df_spc_wolf:"Gray Wolf"
df_spc_reddeer:"Red Deer"
I added all of the necessary calls for my added animals, I set the correct gender information too, in the previously discussed game.def file.

Next was the hardest part, I had to figure out HOW TO EDIT THE ANIMAL SELECTION LIST, and I can't tell you how many .esc files I had to restore because I messed up. Forgive my frustration but I did every ounce of this in Notepad++, Paint.NET and Windows explorer, I've spent the last 3 days of my life switching through those various apps and I think I'm going insane lol.

And finally, I got to an unsuspecting file called mfreehunt.esc, located in base:\ui\, read it through, got to a section that reads:

[quote}
entity "ui.comp.group" {
evalues {
"fitting" : "true"
"coords" : "21 82 331 547"
"layer" : "-1"
"name" : "population"
}
entities {
entity "ui.comp.common.text" {
evalues {
"look" : "63"
"value" : "@@mm_animalpopulation@@"
"layer" : "1"
"coords" : "21 515 331 547"
"name" : "t_population"
}
}
entity "ui.comp.common.button" {
evalues {
"look" : "36"
"value2" : "@@mm_dangerousyes@@"
"value" : "@@mm_dangerousno@@"
"button_type" : "1"
"layer" : "1"
"id" : "95"
"tooltip" : "@@et_ge_dangerousanimals@@"
"coords" : "60 82 293 106"
"name" : "danimals"
}
}
entity "ui.comp.common.dropdown" {
evalues {
"look" : "28"
"tooltip" : "@@mt_fh_species@@"
"coords" : "37 410 169 496"
"layer" : "1"
"id" : "500"
"name" : "species0"
}
entities {
entity "ui.comp.common.list" {
evalues {
"look" : "29"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_data" : "0"
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_text" : ""
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_active" : "false"
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_pml" : "/material/ui/icon/a_buffalo.mat "
"item_gap" : "5.00000"
"item_width" : "64.00000"
"item_height" : "64.00000"
"multi_column" : "true"
"coords" : "169 289 586 496"
"layer" : "12"
"name" : "ui.comp.list"
}
entities {
entity "ui.comp.text" {
evalues {
"text" : "<color value=@@rgb_main@@><img src=/material/ui/color.mat xscale=stretch yscale=stretch>"
"layer" : "11"
"coords" : "169 284 587 496"
}
}
}
}
}
}
[/quote]

There is a lot to unpack here, but to start, the "item_pml" calls for the Buffalo icon, which isn't actually seen there that many times. By my count, that call is made 15 times, as are the item data, text and active calls. However, I'm completely stumped as to where 15 comes from, especially considering there's another 5 sections very similar in structure to this-- which lead me to believe that this is the animal population selection screen in the free hunt menu-- and I was correct, as I would soon realize. However, they all have less of each call, but the same amount within their individual section (if that makes *any* sense). I won't sugar coat it, I'm stumped there, and truthfully, I'm not even sure what those calls to the buffalo icon or "active items" are.

My best guess is that this is a per-map basis, and that the amount of calls is based on how many animals are available to select. Which, if you're hunting in Africa or Northeast where there's only 4 animals, the majority of animals are unselectable-- hence, the "item_active" : "false" calls relating to the icons. However, the fact that they're *all* pointing to the buffalo icon doesn't make sense to me.

I digress, based on the animal index orders, and the item heights and widths, factoring in the 5 pixel gap, I determined that I needed to extend the bottom boundary of the list by 69 (nice) pixels, if this chunk of code was what I thought it was. To figure out how to do that exactly, I took a look at the coords calls, which specifiedan area of roughly 200 vertical and 400 horizontal, which roughly matches the black area taken up by the animal selection in size. With that, I determined the value that needed 69 added to it was the 4th one, the 496. I added 69 to each subsequent value in that placement, including the one located in manimal_db.esc (located in the same directory).

This and various other forms of tinkering taught me a tiny bit about how to code in esc and def formats for this game, so that's pretty neat I guess, so thinking I had done all I needed, I compressed it in WinRAR, using the store method, with ZIP compression (I tried RAR and it did not work I have not tried RAR4 but I am pretty certain it wouldn't work either).

I boot into the game, it launches. I excitedly go into free hunt (FYI, I did make the various animals in-game available on maps in the game.def file). I click on the drop down, aaaand I'm met with this weird instance of 6 white squares where the custom animal icons are meant to be. Just about anything could cause that too, another toughie.
20211018041121_1.jpg
When I hover over the various animals, the animal names show up and the little click sound plays, it's definitely doing something. However the icons don't appear and I'm clueless as to what could possibly be causing it.

But what's far, far more frightening is upon trying to load into a game with one of the new animals set to spawn in, the game doesn't load, it freezes as the "assigning units" section then crashes. When I try and load them in the Game Animals menu, same deal.

Despite that, one curious little nugget is that when I open the mission editor, and create a new mission, I can select the animal and place it, but when I place it, none of the custom animals appear; the marker is there, but no model or texture is present. The normal game animals, predictably, work just fine. With a custom animal placed, upon trying to load the mission... crash at assigning units like free hunt. And hunts without custom animals work just fine as well.

As discouraging as this looks, I want to put this into perspective for you, reader, for a second; this issue doesn't end this mod's journey. I am willing to bet my life savings that this is something very small that I'm overlooking that's causing the assigning units error. To widen this perspective further, this game is 12 years old and after HUCorner's work has been seemingly purged, there is virtually no serious modding scene for this game, and the miniscule scene it does host, is both small and very inactive. That said, I have added 6 NEW ANIMALS to this game when all is said and done, and if somebody HAS done it before me, it has not been documented. I started trying to mod this game back in August, resumed on the 4th of this month from scratch. I have managed to do, in the last 2 weeks, what (to my knowledge) nobody else has done in 12 years. That sounds really braggy, but the actual reason I bring that up is because this road block isn't ending this project. Not even close. It's already *this* close to being a success, and it'll be the 1st mod of its kind. Paired with HU corner's modpack (which can be found using the Wayback Machine internet archive), it would be a blast to play. I bring this up, more than hyping up what has been done, I post this information and this little chest beater at the end of this update in the hopes that it helps somebody make something FAR more impressive than what I've done.

Keep in mind, even if this is successful, it's 6 model swaps using entirely already-existing game assets and reused .pba behavior animations, this isn't the end of this game guys. As somebody who's been playing since he was 7 years old, since 2010 (within a year of this game's release), I'm going to continue to improve as a modder, but my far greater goal is to rejuvenate this modding community. Right now its texture swaps and basic model imports. Tomorrow? It could be brand new animations, behaviors, completely original models and textures, what I'm trying to tell you is that whether I'm successful in this or not, this is about to be a BOOM in the staggering community of this game that still remains. SCS gave up on Hunting Unlimited, they quit, and to me, that's just motivation, we're gonna succeed where they failed. We're gonna make this game into something they couldn't DREAM of. And the prospect of that is far more impressive to me than my shoddy coding and probable texturing screwups.

Anybody interested in this, whether you'd like to try/test the mod, help me out, or want help yourself, absolutely feel free to PM me, I promise I'll answer. I don't care how dead this community LOOKS, I'll be here. I stuck with Mario Kart Wii's modding scene LONG after the game should have been dead, and I'll absolutely stick by this game the same exact way, no matter how poorly aged and graphically unimpressive it is by todays standards. SImply put, they lost a gem when they went a different direction with 2011 and stopped making the game after. This is gonna be fun.

Let it be known: We're *****THIS***** close. And I'll make that a motto.

##########################################################
Uncovering Issues
##########################################################

First up, white square issue. No, I have not fixed it, however I took the advice of another post and tried using the command console. If you're unfamiliar, it's another post right here on this forum at viewtopic.php?f=26&t=291791, following it will enable you command and developer privileges, and there's some neat things you can mess with, as well as a lot of potential.

He used it to access some normally inaccessible maps, as well as finding a cheat functionality, which so far I've been unsuccessful in using to its fullest-- I'll certainly entertain that idea, but later. Once I figure these issues out and, moreover, find a way to fix them.

With the console visible, I load into the free hunt setup menu, with a map that has none of my custom animal icons visible. Everything works just fine. However, when one of my custom animals is active, the console displays the following:
[gl] texture object: NULL item data (material/ui/icon/a_coyote.tobj)
Just below that, it says
[tobj] failed reading map name from file 'material/ui/icon/a_coyote.tobj'
I THINK this is fixable, but I want to document this because I MAY know the cause. The "NULL item data" plus the "failed reading map name" leads me to believe the tga images I'm editting with Paint.NET are slightly different/newer (something to that degree). Because of that, the game can't process the format because it's too... new-ified. I really don't know entirely, but here's another interesting little nugget of info.

The icons, like the animal icons used in the menus, all weigh in at exactly 17KB. However all of the ones I copied, renamed, then editted are a lesser 11KB. To me, the only answer is that SOMETHING is getting corrupted along the way, but... I don't know what, how, or why.

I think it's a Paint.NET issue, as in, once I save it, it saves it in such a way that it tries to conserve space, and in that midst of that, lowers its size. However, even with that in mind, I simply fail to see how that could be an issue-- it should be a good thing, right?

What's even weirder about this, is that the same exact thing is happening with the models, despite the fact that the models are completely unedited from their originals; the Coyote model is an exact copy of the Grey Wolf, these animals are all essentially texture edits with added in-game slots and availability.

I'm running into this weird problem in Zmodeler2 where I can import an unedited model just fine, and export it the same way. However, once I export said model, it decreases in storage size, and upon trying to open it again, I'm hit with a neat little "Out of Memory" error; the pmg format I export the models as is meant for one of the trucking simulators-- that effectively means that I need to find a way to export these as .pmg files meant for HU, as opposed to ETS. Pretty tall task but I'm up to it I suppose. I did tell you I was gonna do this, after all.

Why did I open the modelers in Zmodeler2 you ask? It's simple, the models didn't load, even when I directly copied them and did all the texture paths and such, which I don't really understand either.

Even with that in mind, I have all the scripts in place, these animals appear in every part of the UI they should-- the only thing left is to fix this data loss/corruption issue, and this thing's good to go guys. Wish me luck.

##########################################################
Prism 3D Crash Reports
##########################################################

I've been loosely keeping tabs with this lately but didn't post a whole awful lot in the mean time, I was stumped and this thing was frustrating me. I really didn't want to spend my time sat in front of my computer trying to figure out something I couldn't do, so I left it, every now and then, coming back to give something else a try. I've made numerous swtiches to my approach, using different model and file formats with no success. I did try something else that yielded some... interesting results.

I took a model directly from game files, exported it through Zmodeler2, edited it in Blender (minimally, but still). I re-import it, but instead of using a custom animal, I used an already existing and fully functional animal in an unaltered, vanilla base.scs archive. I detailed that when placing my custom animals in the mission creation tool, the icon would appear but not the model itself when you zoomed in. Well, when I did the same thing with a vanilla animal and my edited model for it, the same thing happened with one pretty major difference: the game actually loaded.

The game loads, (I'll add screenshots later today or tomorrow, I didn't take any yet as of writing). What I saw was a shadow where the animal was evidently standing, but much like the view in the editor, no visible model, for male, female OR young. I was curious about a lot at this point, so my first thought was to script it to attack me. My expectation was that it would of course crash, but to my surprise, the animal (I used a cougar for this) charged right at me and killed me, and the shadow moved around. That was intriguing on its own, but my 2nd idea was to see if I could shoot it.

I load it up a third time, raise my weapon, aim where I presumed it was standing, and before I could even hear the shot, the game crashed. I was extremely happy at this point because generally, when I change anything, the game fails to even load, much less function to a degree where whatever animal I edited was able to perform its scripted behaviors, this is an improvement, in some kind of way at least. It doesn't shock me that it crashed when I tried to shoot it, mainly because there's surely a collision detection method that relies on the model, which hollar-hollar, wasn't there. Or that was my thought, maybe that can be disproven but... not right now.

I mentioned my "hiatus" and in that time, I was centered around Open Dynamics Engine and Prism3d, as the game relies on both of these engines to load... basically every single model and graphic in the entirety of the game. If there was one thing going for me, it's that nearly every single one of my problems have a solution that lies in one of these engines. Well, the one file I didn't check out, which ironically sat right inside the install folder, was a Prism3d crash report... Now, I'm not going to begin to go into how absurd it is that I overlooked this crash report god knows how many times since last August, but seriously- the *one* file in this entire folder I decided not to check out was literally titled prism3d.crash, and here I was cracking 17 different game dll files in HxD. Classic Noah overcomplicating everything I do lol

So I whip this thing open in notepad, laughing hysterically whilst raging inside, and sure enough, it has logged every single instance of this game crashing since August 21st of 2021, the reason this is so painful is because the vast majority of it is useless to me. I don't know which base.scs file I would have been using in each instance except for the most recent couple, this is heaps and mountains more of information I cannot use, and that would be frustrating if it wasn't so funny, but the good news is, I *can* use this from now on and it's going to make life way, WAY easier on me.

So I decided to test it- once. I try to load a custom animal, it of course crashes, and this is going to sound like hyperbole, but that's actually what I want- now I have it in the crash report. I scroll to the very, VERY bottom of the report, to see what the damage was, and it reads this:
-----------------------------------------
Crash log created on: Sun Apr 03 16:54:24 2022
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 0C3FF3D0 0001:000AE3D0 C:\Program Files (x86)\Games Of The Month\Hunting Unlimited 2010\lib\game.dll

Registers:
EAX:0019ED1C
EBX:16D13DD0
ECX:00000000
EDX:1CD88750
ESI:1CF2E028
EDI:16D13DD0
CS:EIP: 0023:0C3FF3D0
SS:ESP: 002B:0019ED0C EBP:00000030
DS:002B ES:002B FS:0053 GS:002B
Flags: 00010246
EIP preamble: 54 A1 4E 0C 56 FF 10 83 C4 04 8B C6 5E C2 04 00
6A FF 68 08 44 4D 0C 64 A1 00 00 00 00 50 64 89
25 00 00 00 00 83 EC 10 56 8B F1 8B 86 70 01 00
00 57 50 8D 4C 24 14 E8 C4 F1 0A 00 8B 4C 24 14
EIP bytecode: 8B 41 1C 33 FF 3B C7 89 7C 24 20 74 0E 8A 48 06
C0 E9 07 84 C9 89 44 24 0C 75 04 89 7C 24 0C 53
C7 44 24 0C C8 11 53 0C 55 8D A4 24 00 00 00 00
8B 54 24 14 8B 44 24 10 8B 4A 60 50 E8 9F 2A 0C

Call stack:
Address Frame
0C3FF3D0 00000000 0001:000AE3D0 C:\Program Files (x86)\Games Of The Month\Hunting Unlimited 2010\lib\game.dll
0C49E7EE 00000000 game_get_dl_ops+4D3DE
0C400A5F 00000000 0001:000AFA5F C:\Program Files (x86)\Games Of The Month\Hunting Unlimited 2010\lib\game.dll
0C415605 00000000 0001:000C4605 C:\Program Files (x86)\Games Of The Month\Hunting Unlimited 2010\lib\game.dll
779A6D93 00000000 RtlAllocateHeap+1003
7C3420D6 00000000 msize+34
779BC11B 00000000 RtlWalkFrameChain+9B
779A6D93 00000000 RtlAllocateHeap+1003
779BC11B 00000000 RtlWalkFrameChain+9B
00408EB5 00000000 mem_sys_free+25
Now, I know next to nothing about *any* of this except that it's obviously hexadecimal code, and I DO understand what is seemingly the most important part- the culprit or, at the very least, an explanation, lies within the game.dll file, which a good chunk of is actually readable through a hex editor- excellent. This is a pretty good start, so I'll be digging around this for a while, and if somebody who actually knows what they're doing stumbles upon this, I'd appreciate some help where you can offer it! Expect another update... soon :D
Last edited by NmanMETA on 03 Apr 2022 21:39, edited 5 times in total.
WE'RE *THIS* CLOSE!
User avatar
plykkegaard
Posts: 7204
Joined: 26 Oct 2014 13:42

Re: Are New (modded) Animals in Hunting Unlimited 2010 Possible?

#2 Post by plykkegaard » 14 Oct 2021 07:45

The automat folder is from when the game is build before distribution, it shouldn't matter where you have your textures afaik (ETS2/ATS modding)

This signature virus has been spliced with the Fundementalism-B virus to create a new more contagious strain. Please look for it infecting a signature near you.
User avatar
NmanMETA
Posts: 48
Joined: 25 Apr 2021 03:56
Location: The Good 'Ol USA!

Re: Are New (modded) Animals in Hunting Unlimited 2010 Possible?

#3 Post by NmanMETA » 14 Oct 2021 20:53

plykkegaard wrote: 14 Oct 2021 07:45 The automat folder is from when the game is build before distribution, it shouldn't matter where you have your textures afaik (ETS2/ATS modding)
Good to hear that I didn't destroy my game or anything, also will make my life easier when I figure this out :D

Thank ya!
WE'RE *THIS* CLOSE!
EibeAxxt
Posts: 17
Joined: 12 Nov 2020 17:24

Re: Are New (modded) Animals in Hunting Unlimited 2010 Possible?

#4 Post by EibeAxxt » 09 Nov 2021 22:58

Hey man, i am truly astonished in your dedication to this game, and i really like it. So because i got motivated by this post, i made something that you would be interested in.

Do you know what TCRF is? If not, it's basically a wiki for games/software that have hidden code, items, maps, etc. And i made one that you might be interested in. Here is the link:

https://tcrf.net/Hunting_Unlimited_2010

I hope this helps about your research, cause honestly, i don't know what to say, your research is amazing! The thing im most interested is the code "g_ai_debug". It has to have a meaning, since it does absolutely nothing. Thank you and good luck, hoping the best out of this. I'm gonna start researching your problems and other stuff as well.
User avatar
NmanMETA
Posts: 48
Joined: 25 Apr 2021 03:56
Location: The Good 'Ol USA!

Re: Are New (modded) Animals in Hunting Unlimited 2010 Possible?

#5 Post by NmanMETA » 13 Nov 2021 01:23

EibeAxxt wrote: 09 Nov 2021 22:58 Hey man, i am truly astonished in your dedication to this game, and i really like it. So because i got motivated by this post, i made something that you would be interested in.

Do you know what TCRF is? If not, it's basically a wiki for games/software that have hidden code, items, maps, etc. And i made one that you might be interested in. Here is the link:

https://tcrf.net/Hunting_Unlimited_2010

I hope this helps about your research, cause honestly, i don't know what to say, your research is amazing! The thing im most interested is the code "g_ai_debug". It has to have a meaning, since it does absolutely nothing. Thank you and good luck, hoping the best out of this. I'm gonna start researching your problems and other stuff as well.
I'm gonna check this out for sure, I got a bit lazy with this over the last couple weeks and fell off a bit, but I've still stewed on it from time to time.

And in particular, I find myself thinking about the debug activation; nearly every video game can be altered on the fly with a debug setting. My guess is, there is either another unspecified parameter that goes with it that isn't listed in the config, as it does seem to have some kind of function, it just... doesn't go brrr when you try it. But you've gotta be right, there has to be more. In fact, I wouldn't be the least bit surprised if it's somehow linked to the cheats, although that's another one that has me stumped.

The console itself is very... cryptic, when loading into a map, it says "loading avatar", and it even does it for the live animal window on the home menu, which tells me there is a command somewhere that allows you to spawn an avatar, I'm just not sure what "avatar" refers to. I doubt it's a hunter model, as HUCorner's Powerpack mods had hunter models that you could place in the mission edittor, I think avatar calls to a POV camera/camera position, although that's a mere guess. Regardless, upon loading into the home menu, it also specifies "animal00", "animal01" etc. spawned, with their species and gender specified, which tells me that it runs a command every time an animal is spawned, and I am willing to bet that there is some parameter in the config file that will make those background commands visible in the console. IF that's the case, the good news is that the cheats in question may be simple commands. The bad news is, I've tried countless combinations of the config file's settings and even a few guesses, nothing has worked yet in regards to making background commands visible.

I suspect that the cheats are likely just command lines, think of Minecraft commands like "/give player minecraft:diamonds 64", I do think it possible that hunting unlimited would possess a command process similar like "/set max_ammo def 270_bolt:weapon_bolt 10" or something like that to change the maximum ammo limit for that weapon to 10, just as an example, most games with intended cheats have an easy-to-interpret command system. The OTHER possibility is that it's a hex system like Gecko Codes for Wii games, or Action Replay cheats for the DS and 3ds family. If you're not familiar with those, they operate on calls to game assets through hex values, which would make it possible to have certain items at the press of a button in Mario Kart DS for example, however these aren't intended exploits, which meant that the user had to find out what a given hex value was, and write the code entirely by themselves. It meant you had complete free reign over cheats, but that said cheats were not easy to write on your own. However, being that HU says that there ARE cheats, I do not think it'll be hex based- THANK GOD.

Needless to say, there's clear potential with g_ai_debug, I just think there is a parameter or two that isn't known, and finding it is likely to be a big pain in the booty. And in honesty, I want to find out how to see background processes within the console. Finding that may answer the cheat/command question, and it may also answer the question of what on earth is happening to the custom animals' various data.

In my finding, the vanilla icons were 17kb in size, where the ones I made/modified were just 11. The black bear icon, I changed to have green eyes just to see if it would do the same. However, it still showed up in-game despite the smaller size. I DID figure out the size quirk, when I'd save the icons in Paint.NET, it would automatically compress them. The simple answer was to turn off compression, and whamo, 17kb like all the rest, however they still didn't load in-game, so it turned out to be a non-issue, there's something I'm missing, and whatever it is, I suspect is the same reason the animal models fail to load in game, as is with the textures, somewhere along the way, whatever I am doing when I copy/move those files is corrupting them somehow. Now, since I have everything I'll need graphically, my intention is to restart from scratch one more time, this time, making explicitly sure not to alter any of the models in Zmodeler2 so as not to risk size change. My fear is that this is somehow linked to the animations, which there isn't a known way to edit outside of... hex editing, something I'm frankly "unpracticed" (we'll say) in. If that's what it'll take, it will be done, but it could take a while if that's indeed the issue, though my hope is that it's just a mismatch in an asset call that I didn't create/change. The menu recognizes it's THERE, but it doesn't load anything.

Nevertheless, I thank you greatly for pointing me in a good direction here, it's high time I jump back into this before I lose my momentum. I did promise that this mod would be made, after all :D
WE'RE *THIS* CLOSE!
Adyusha
Posts: 12
Joined: 12 May 2022 18:55
Location: Russia

Re: Modding Animals Into Hunting Unlimited 2010

#6 Post by Adyusha » 28 Jun 2022 19:13

I think I have found a solution to the error:

Code: Select all

[tobj] failed reading map name from file 'material/ui/icon/a_coyote.tobj'
[gl] texture object: NULL item data (material/ui/icon/a_coyote.tan)
The path to the texture

Code: Select all

material/ui/icon/a_coyote.tga
, which is registered in the file

Code: Select all

a_coyote.tobj
should not be edited in notepad. To do this, use the HEX editor or tobjEdit.exe (it worked for me).
As for the textures of the dds format, I also checked the dependence on the file size, but this does not cause problems. I advise you to perform the following parameters when exporting:
  • DXT1
  • Iterative
  • Unified
  • Generate Mip Maps (Bilinear Filtering)
Mip Maps is required to display textures when changing graphics settings. If you do not enable this option, the texture can be displayed at high settings, but not when changing to low settings. Also, I recommend not using textures larger than 512x512 pixels to avoid lags.
Last edited by Adyusha on 28 Jun 2022 20:17, edited 2 times in total.
User avatar
NmanMETA
Posts: 48
Joined: 25 Apr 2021 03:56
Location: The Good 'Ol USA!

Re: Modding Animals Into Hunting Unlimited 2010

#7 Post by NmanMETA » 02 Jul 2022 01:07

Adyusha wrote: 28 Jun 2022 19:13 I think I have found a solution to the error:

Code: Select all

[tobj] failed reading map name from file 'material/ui/icon/a_coyote.tobj'
[gl] texture object: NULL item data (material/ui/icon/a_coyote.tan)
The path to the texture

Code: Select all

material/ui/icon/a_coyote.tga
, which is registered in the file

Code: Select all

a_coyote.tobj
should not be edited in notepad. To do this, use the HEX editor or tobjEdit.exe (it worked for me).
As for the textures of the dds format, I also checked the dependence on the file size, but this does not cause problems. I advise you to perform the following parameters when exporting:
  • DXT1
  • Iterative
  • Unified
  • Generate Mip Maps (Bilinear Filtering)
Mip Maps is required to display textures when changing graphics settings. If you do not enable this option, the texture can be displayed at high settings, but not when changing to low settings. Also, I recommend not using textures larger than 512x512 pixels to avoid lags.
Awesome! Thank you for pointing that out to me, I'll give 'er a whirl!
WE'RE *THIS* CLOSE!
Gigabite
Posts: 4
Joined: 26 Sep 2023 22:00

Re: Modding Animals Into Hunting Unlimited 2010

#8 Post by Gigabite » 26 Sep 2023 22:05

Hello i want to help you with these mods... im making a group in steam with all the modders of hu10 do you want to partecipate? You Will be my First user in that group and we Will find other users and fix your hu10 mods.

Posts merged

https://youtu.be/MPa4L2PvIgo?si=YNfebzC_v2HnhbnD some guy did It also do you have steam? Im making a group in steam of modders of hu10
User avatar
Tunahan_cevik41
Posts: 13
Joined: 04 May 2022 13:02
Contact:

Re: Modding Animals Into Hunting Unlimited 2010

#9 Post by Tunahan_cevik41 » 02 Dec 2023 14:33

Gigabite wrote: 26 Sep 2023 22:05 Hello i want to help you with these mods... im making a group in steam with all the modders of hu10 do you want to partecipate? You Will be my First user in that group and we Will find other users and fix your hu10 mods.

Posts merged

https://youtu.be/MPa4L2PvIgo?si=YNfebzC_v2HnhbnD some guy did It also do you have steam? Im making a group in steam of modders of hu10
great plan!
This is very necessary to prevent hunting unlimited games and modes from dying.
For this reason I thank you.
Please keep us informed if there is any development.
Gigabite
Posts: 4
Joined: 26 Sep 2023 22:00

Re: Modding Animals Into Hunting Unlimited 2010

#10 Post by Gigabite » 21 Jan 2024 00:54

https://discord.com/invite/duETHJCm heres the link to the discord group feel free to join everyone that wants to help join here i lf we reach atleast 10 people i might make a website for it
Post Reply

Return to “Hunting Unlimited Series”

Who is online

Users browsing this forum: No registered users and 3 guests