News:

Welcome to World of Banished!

Main Menu

Advice on Citizen.rsc

Started by XSamatan, March 15, 2019, 12:59:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

XSamatan

Hello,
I played a little with the devkit and stumbled on a question I can't answer myself:

If I want to change just one value in \Citizen.rsc (float _agePerSecond) what happens I load this change over CC? Will the other changed values be read by the game or do I have to copy the values of CC into my changed flie?

Regards,
XSamatan

RedKetchup

if you specific just Citizen.rsc everything inside will be taken and all inside the Citizen.rsc CC file will be discarted.

now if you target "/Template/Citizen.rsc:citizen", only your citizen function, entirely, will be taken. Everything outside wont matter. all CC at outside of this citizen function will be kept.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

XSamatan

Thanks very much for the fast reply! That's great to know.

Would you mind guiding me through setting up this little mod?

I created a new folder (ageing) and put there
- a subfolder (/template/) containing my changed citizen.rsc
- icon.png
- Package.rsc
[spoiler]PackageFile Ageing
{
   String _name = "50Ageing";
   String _author = "XSamatan";
   String _description = "This mod lets Bannies age two times faster than vanilla";
   String _icon = "icon.png";
   String _preview = "preview.jpg";
   int _userVersion = 1;

   // all files in resource directory
   String _includeList
   [
      "*"   
   ]
   
   // exclude package files, mod files, file used for building packages
   String _excludeList
   [
      "Package_*.crs"
      "*.pkg"
      "*.pkm"
   ]
}
[/spoiler]
- preview.jpg

If I now call tools-x64.exe /mod package.rsc:50ageing /pathres ../ageing /pathdat ../ageing/templates the dialog ends with this error message:
Assert: Failed to load resource 'C:\BanishedKit\Ageing\template\Package_50Ageing.crs'

What am I missing?  :)

RedKetchup

#3
first you called your package file Ageing

PackageFile Ageing
{



and here you dont called it the same thing: 50ageing

tools-x64.exe /mod package.rsc:50ageing /pathres ../ageing /pathdat ../ageing/templates


both should be the same because the 2nd one call the first one.

the path should be just about your mod folder, nothing else inside (like template folder)

bin\x64\Tools-x64.exe /build 50ageingResources.rsc /pathres ../ageing /pathdat ../ageing/bin
bin\x64\Tools-x64.exe /mod Package.rsc:50ageing /pathres ../ageing /pathdat ../ageing/bin


along with your Package.rsc and icon.png you need to make a new .rsc file and in that, copy paste this and you call it: 50ageingResources.rsc

ExternalList resource
{
External _resources
[
"Template/Citizen.rsc:citizen",
]
}


make sure in Package.rsc : package file function is the same as 50ageing.
that name also decide the name of your pkm. with 50ageing you will get 50ageing.pkm
btw also make sure /Template/ folder name doesnt have an "s" at the end.

all my .bat have bin\x64\ at start cause it depends where is my mod folder versus where is the /Bin/ folder. adapt to your setting.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

XSamatan

Thanks for your advice!
With it I managed to use the /build command properly and the .exe created a new folder (50Ageing\bin) with two *.crs files (50ageingresources_resource.crs and \template\Citizen_citizen.crs).

However, the command /mod package.rsc:50ageing /pathres ../50ageing /pathdat ../50ageing/bin resolves in errors like this one Assert: false C:\BanishedKit\50ageing\package.rsc (0): error: Unexpected token '50A' while looking for name.

My package.rsc looks like this:
PackageFile 50Ageing
{
String _name = "50Ageing";
String _author = "XSamatan";
String _description = "This mod lets Bannies age two times slower than vanilla";
String _icon = "icon.png";
String _preview = "preview.jpg";
int _userVersion = 1;

// all files in resource directory
String _includeList
[
"*"
]

// exclude package files, mod files, file used for building packages
String _excludeList
[
"Package_*.crs"
"*.pkg"
"*.pkm"
]
}


I feel like I messed up the naming (again :/), but where? All instances of Ageing are called 50Ageing now.

Does your comment
Quoteall my .bat have bin\x64\ at start cause it depends where is my mod folder versus where is the /Bin/ folder. adapt to your setting.
have anything to do with these error codes?

RedKetchup

oh it doesnt like you start the name of the mod by a number like 50A

try othername like in letters FiftyAging. change in bat, change in the package and name of resource file.
i saw something like that ... once a time a year or 2 ago
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

XSamatan

That's hilarious!  ;D

OK, changed the name everywhere to "ageing".
Re-build the files in /bin directory

When running
/mod package.rsc:ageing /pathres ../ageing /pathdat ../ageing/bin
the error says know
Assert: Failed to load resource 'C:\BanishedKit\ageing\bin\package_ageing.crs'

I do not have such file - what did I miss while building the *.crs-files?

kid1293

Did you check for capital letters everywhere? Sometimes ageing sometimes Ageing

XSamatan

Well, it works now - so I probably had a typo :)

Thanks kid1293!

And thanks a lot Red Ketchup!

kid1293


RedKetchup

sorry i was sleeping.......

glad to hear you finally resolve it. yeah , typo error are the worst ones cause we can re-read 10 times, and the typo wont flash in the brain.....
banished toolkit is uppercase/lowercase sensitive. and some of special caracters are forbitten because they are used by the toolkit itself...
and it is more clear than ever he hates numbers at start of a name....
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .