Cracked the code on New Species!

Post Reply
connieisdead
Posts: 1
Joined: 13 Apr 2023 04:03

Cracked the code on New Species!

#1 Post by connieisdead » 17 Apr 2023 23:11

Hey folks!

I'm new to the forum but if any of you play Planet Zoo and mod that game you'd recognize me as Phonetic :)

I was playing around with this game, since I had it in my steam library and figured I'd take a crack at modding it. Looked through some posts on here by NmanMETA and saw there was some difficulty with the process - though it seems like Adyusha pretty much managed to figure it out. Anyways, I figured I'd post here to see if there was any life in this game's modding community and illuminate the process a bit...

WHAT YOU'LL NEED

Get yourself the following things:
- WinRAR
- Notepad software of some kind
- A hex editor (I'm using HxD)
- GIMP (or any software that can load .dds files - but just use GIMP)
- a tobj editor (I found somewhere on these forums but you can use a hex editor if you don't have this)
- any photo-manipulation software that you're comfortable with

THE LOWDOWN

First and foremost, I recommend starting with a non-antlered species as it will be a simpler process, and please keep in mind this tutorial will teach you how to make a simple retexture-type mod. You can change whatever you'd like about the animal including its size, behavior, and presumably its antlers if you modify your game.def further and experiment a bit - but model replacements are beyond me at the moment, since zmodeler2 is just not something I'm having any luck with using.

With that in mind, let's begin!

Find base.scs in your game files and extract somewhere with WinRAR

So basically the folders you're going to be working with (extracted from base.scs) are: automat, def, material, models, script, and ui - everything else you can leave alone.

A good place to start would be in the game.def - search for the portion that codes for the species you are basing your mod off of; it'll start with something like this "def wolf:/species_kind {" and then go on to code for the male, female, and young of that species. Make sure you grab the whole portion of text and paste it somewhere else in the list of species (between entries or at the end).

Then, you're going to want to replace all instances of the original species' name with the new species' name. In this case I replaced "wolf" with "coyote". Make sure that the new name has the same number of characters as another species in the game (this will matter later on). After that, make sure you change the index number to "19" or whatever number your species will be - if it is the second new species it will be "20", then "21", you get the idea.

I would now save your game.def and refrain from changing anything else about your species. There are a lot of things you can change in here that will break the mod and cause you a lot of confusion so just save your experimenting for when you've finished the coding. The other file in your def folder is ai.def and you can pretty much just copy your base species' entry and change the name - then you're done with defs for now!

The script files are also pretty simple, just copy the file from animal_db of your base species, change the name to the new species' name - replace any instances of the old name, except the sound paths unless you plan to add your own sounds, with the new one and save. You can also edit the script/en/local file to include your new species' name with proper capitalization and formatting - it's pretty self explanitory, just search for the name of your base species and you'll find the lines that account for the animal names - just make a new one with your species and save.

Next are the icons! So what you'll want to do is copy the .mat and .tga files from your base species and rename them, then copy the .tobj files from a species that has the same number of letters in its name as your modded species and rename those as well. Use your hex editor (tobj editor hasn't worked on these tobjs for me) on the .tobj files to change the file paths to reflect the name of your new species, then use your text editor on the .mat files to do the same thing. Edit the .tga files in gimp or export them as .pngs and re-import them to gimp to reflect your new species - or wait until later - and you're done with icons!

For the models folder, you'll want to copy the folder with your base species and rename it to reflect the new one. Then, use your .tobj editor to change the paths in all of the contained .tobj files to reflect the name of your new species. Okay, now this is where things get a little weird. Open the .pmd file - which contains the model of your animal - in your hex editor and scroll to the bottom where you should see the texture paths. It'll look something like this "/automat/b9/490er5.mat/automat/ad/d01p44.mat/automat/1b/0903a7.mat"

For each mat file listed in the .pmd you're gonna need to navigate through your automat folder to the folders listed (ex. b9) and copy the mat file inside (ex. 490er5.mat). Change some of the numbers in the name of the .mat file and hex edit the .pmd - replacing the old .mat name with the new one. Do this for every .mat file and you're done!

The last thing you need to do to see your new species in game is modify the mfreehunt.esc file in the ui folder to expand the boxes by 69 pixels for every 6 species you plan to add. It's not at all hard but not the simplest thing to do or explain. I'll include my file that has all six boxes expanded by a row for you guys to look at - it should be easy enough to figure out if you need to add another row, just increase the y-coord by 69 in the right spots and you're good.

Here's my freehunt file: https://www.dropbox.com/s/5nl8340t9kwqq ... t.esc?dl=0

After that you can copy everything into the base.scs file - just make sure you have it set to store so none of the files get compressed, if you don't it'll crash the game.

Check it out in-game, hopefully everything works! You can further modify your species' entry in game.def to change its scale, scoring, behavior, etc. and you can edit the textures within your models folder to change its appearance. Feel free to experiment - and report back on anything you find!

PROOF OF CONCEPT COYOTE MOD

[ external image ]

[ external image ]

[ external image ]

https://www.dropbox.com/s/kg04s0i9so3ztoj/base.scs?dl=0
+ the base.scs which includes the coyote as a new species for you all to check out if you need an example!

Be careful about adding modded species to your trophy room because they will break your save if you delete them!!

Also, I can't get the new animals to work properly in the database - any animal after the 18th that I try to include crashes the db when you open its page. Do let me know if you have an idea why this is!
Adyusha
Posts: 12
Joined: 12 May 2022 18:55
Location: Russia

Re: Cracked the code on New Species!

#2 Post by Adyusha » 22 Apr 2023 20:43

Hi. Good job.
The community will live as long as there are people who are interested in this game. It seems to me that many people like to feel like a researcher and look for answers to previously unknown things.
To the database account. You can see what happens in the prism3d.crash file.
User avatar
NmanMETA
Posts: 48
Joined: 25 Apr 2021 03:56
Location: The Good 'Ol USA!

Re: Cracked the code on New Species!

#3 Post by NmanMETA » 24 Aug 2023 02:41

Do let me know if you have an idea why this is!
Yeah so essentially, this crashes because the game is trying to load a .def file that doesn't exist. If you go into base/script/animal_db, you should see a .def file for each animal. Looking at these in a notepad-like app, these should look familiar to that of the games missions.

This is because... well, essentially, that's exactly what they are, they're the same type of .def file as the mission, except obviously there's no equipment settings or spawn points for a hunter since these were never meant to be played.

My thinking is, if you take an existing one of these .def files, and replace each instance of the animal with the coyote, save it as "coyote.def", and it should load up properly.

And if you really wanted to go the extra mile like me, go into base/script/en and open local, then scroll down to around line 600, and make a little bio for the coyote, like there is for the other animals.

Something like...

Code: Select all

df_desc0_coyote:"Canis latrans"

df_desc1_coyote:"The Coyote, which has also been referred to as the brush wolf and at one time, the American Jackal, is known for being something of a troublemaker, and far less forgiving than its larger/more social counterparts, the timberwolf. The coyote inhabits the steep majority of North America, and is generally skittish in nature, much of its diet being smaller prey, vs its close relatives who generally take down elk or deer. A coyote is more partial to that of a mule deer or turkey if anything.<br offset=10>Coyotes, while not confrontational, are dangerous when threatened, and to an even greater degree, when traveling in a pack. They're fast, opportunistic hunters and are relentless attackers, leaving those unlucky enough to be the target of an attack in grave danger. Particularly, children and small pets.<br offset=10>Coyotes were seen to be sympolic of trickery and deceit in Native American folklore, much like red foxes, and their image over time evolved into that of a cowardly, easily-frightened animal; which is mostly true to an extent. As with most animals, the vast majority of human encounters aren't even known by the human; however coyotes are generally cautious in nature around humans, again, barring they aren't threatened.
You can use that if you want, I pretty much just jotted it down based off of the game commission page and wikipedia, if I were making a larger/more detailed modpack, I'd make sure to get a decent bio and everything down. HUCorner's old powerpack mods really succeeded among fans because they went the extra mile with stuff like that, even though a good portion of it was just reskins of existing stuff (which is a trend I want to buck someday), it's the UI stuff and details that I feel make a mod. I'll tell you one thing right now though...

You absolutely CRUSHED whatever it was I was doing last year :lol: this mod actually WORKS. Freakin props man.
WE'RE *THIS* CLOSE!
Post Reply

Return to “Hunting Unlimited Series”

Who is online

Users browsing this forum: No registered users and 3 guests