Author Topic: Advice on Citizen.rsc  (Read 247 times)

0 Members and 1 Guest are viewing this topic.

Offline XSamatan

  • Newb
  • *
  • Posts: 5
Advice on Citizen.rsc
« on: March 15, 2019, 12:59:30 PM »
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

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 10632
  • Country: ca
Re: Advice on Citizen.rsc
« Reply #1 on: March 15, 2019, 02:52:16 PM »
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 .

Offline XSamatan

  • Newb
  • *
  • Posts: 5
Re: Advice on Citizen.rsc
« Reply #2 on: March 15, 2019, 05:05:34 PM »
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]
Code: [Select]
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
Code: [Select]
tools-x64.exe /mod package.rsc:50ageing /pathres ../ageing /pathdat ../ageing/templates the dialog ends with this error message:
Code: [Select]
Assert: Failed to load resource 'C:\BanishedKit\Ageing\template\Package_50Ageing.crs'
What am I missing?  :)

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 10632
  • Country: ca
Re: Advice on Citizen.rsc
« Reply #3 on: March 15, 2019, 05:29:17 PM »
first you called your package file Ageing
Code: [Select]
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)
Code: [Select]
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
Code: [Select]
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.
« Last Edit: March 15, 2019, 05:33:07 PM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline XSamatan

  • Newb
  • *
  • Posts: 5
Re: Advice on Citizen.rsc
« Reply #4 on: March 16, 2019, 04:34:11 AM »
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
Code: [Select]
/mod package.rsc:50ageing /pathres ../50ageing /pathdat ../50ageing/bin resolves in errors like this one
Code: [Select]
Assert: false C:\BanishedKit\50ageing\package.rsc (0): error: Unexpected token '50A' while looking for name.

My package.rsc looks like this:
Code: [Select]
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
Quote
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.
have anything to do with these error codes?

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 10632
  • Country: ca
Re: Advice on Citizen.rsc
« Reply #5 on: March 16, 2019, 06:41:33 AM »
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 .

Offline XSamatan

  • Newb
  • *
  • Posts: 5
Re: Advice on Citizen.rsc
« Reply #6 on: March 16, 2019, 07:07:37 AM »
That's hilarious!  ;D
 
OK, changed the name everywhere to "ageing".
Re-build the files in /bin directory

When running
Code: [Select]
/mod package.rsc:ageing /pathres ../ageing /pathdat ../ageing/binthe error says know
Code: [Select]
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?

Offline kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 3172
  • Country: se
  • Never confuse movement with progress
Re: Advice on Citizen.rsc
« Reply #7 on: March 16, 2019, 07:22:51 AM »
Did you check for capital letters everywhere? Sometimes ageing sometimes Ageing

Offline XSamatan

  • Newb
  • *
  • Posts: 5
Re: Advice on Citizen.rsc
« Reply #8 on: March 16, 2019, 08:07:19 AM »
Well, it works now - so I probably had a typo :)

Thanks kid1293!

And thanks a lot Red Ketchup!

Offline kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 3172
  • Country: se
  • Never confuse movement with progress
Re: Advice on Citizen.rsc
« Reply #9 on: March 16, 2019, 08:53:32 AM »
 :)

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 10632
  • Country: ca
Re: Advice on Citizen.rsc
« Reply #10 on: March 16, 2019, 06:28:01 PM »
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 .

 

SMF spam blocked by CleanTalk