World of Banished

MODS Garage => Tips and Help => Topic started by: Maxvdb on September 04, 2016, 12:00:17 PM

Title: errors in tools-x64
Post by: Maxvdb on September 04, 2016, 12:00:17 PM
i'm trying to get modding. i know how to make 3d models, but can't get te tools-64x working propperly

can someone say what í'm doiing wrong?

Title: Re: errors in tools-x64
Post by: kid1293 on September 04, 2016, 01:40:26 PM
It is almost certain something wrong with your paths.
Have you moved the examples?

Have you edited the batch-file?
Title: Re: errors in tools-x64
Post by: embx61 on September 04, 2016, 08:02:10 PM
Kid is right.

It looks for ApiaryResoursec.rsc file and cannot find it.
So the path is not right.

By looking at it again it looks like the bin in the path is wrong.

Copy these lines in a text file and save with extension bat in C:\BanishedKit

bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../example/translation /pathdat ../example/translation/bin
bin\x64\Tools-x64.exe /mod Package.rsc:translationExample /pathres ../example/translation /pathdat ../example/translation/bin

bin\x64\Tools-x64.exe /build apiaryResources.rsc /pathres ../example/building /pathdat ../example/building/bin
bin\x64\Tools-x64.exe /mod Package.rsc:apiary /pathres ../example/building /pathdat ../example/building/bin

bin\x64\Tools-x64.exe /build lettuceResources.rsc /pathres ../example/crop /pathdat ../example/crop/bin
bin\x64\Tools-x64.exe /mod Package.rsc:lettuce /pathres ../example/crop /pathdat ../example/crop/bin

bin\x64\Tools-x64.exe /build figResources.rsc /pathres ../example/tree /pathdat ../example/tree/bin
bin\x64\Tools-x64.exe /mod Package.rsc:fig /pathres ../example/tree /pathdat ../example/tree/bin

bin\x64\Tools-x64.exe /build whiteChickenResources.rsc /pathres ../example/animal /pathdat ../example/animal/bin
bin\x64\Tools-x64.exe /mod Package.rsc:whiteChicken /pathres ../example/animal /pathdat ../example/animal/bin

Are you from the Netherlands or Belgium?
I see your windows is in Dutch. I am born in the Netherlands myself but live since 1999 in the USA  :)

I also see the sprite folder in the root what should be a folder inside the UI folder.
And the 2 files spritesheet.rsc and spritsheetmaterial.rsc should be inside the UI folder too.
Title: Re: errors in tools-x64
Post by: Maxvdb on September 05, 2016, 06:19:43 AM
oke thanks i will try it. yea it didn't find the files so i just copied and paste it everywhere.

jazeker kom uit Nederland:)
Title: Re: errors in tools-x64
Post by: Maxvdb on September 05, 2016, 09:30:15 AM
i have deleted my BanishedKit and reinstalled it. then added your lines, and they work and i can see them and play with the example mods.
but when i make a new folder and add some files, change them compile and start the game i can see the mods even the changed ones but, i added a stonehouse with less stone required to build i don't see the new house on the toolbar.
Title: Re: errors in tools-x64
Post by: embx61 on September 05, 2016, 10:18:13 AM
Can you zip/rar your whole house directory and post it here on the forum so I can take a look at it?

Let see if I have this straight.
You only want to change the build values of the Vanilla Stone houses?

If so you have to make an so called override.

No need for all the graphics and stuff. We just being cheap and using Luke's. LOL.  Only the Stonehouse.rsc file in the Template folder from Luke is needed to change.

Look at some tutorials from Slink in the Tutorials section in this forum for some examples how an override and toolbar stuff is done.

In the beginning the modkit can be very confusing because one file calls another and that one calls another.
But try first a simple override and go from there.

Trust me, with some time it will become second nature, and even while I am modding a bit over a year I still make mistakes enough :)

Title: Re: errors in tools-x64
Post by: kid1293 on September 05, 2016, 11:09:00 AM
Hi!
Take a look at this thread.
http://worldofbanished.com/index.php?topic=1179.0 (http://worldofbanished.com/index.php?topic=1179.0)

tanypredator also started from scratch and in that post there are many
things for starting up.
Title: Re: errors in tools-x64
Post by: Maxvdb on September 06, 2016, 09:22:57 AM
i looked at your DebugMenu i can run the .bat file it finnishes it shows it but cant find it on a new game.

i included a zip file of the DebugMenu with 2 printscreens.

i noticed the game runs version 1.0.6 is that the problem?
Title: Re: errors in tools-x64
Post by: kid1293 on September 06, 2016, 12:34:23 PM
1.0.6 is OK.
here is where to look.
BTW, did you understand what I did in the code?
Title: Re: errors in tools-x64
Post by: kid1293 on September 06, 2016, 12:42:01 PM
Just a heads-up:
When you compile a mod, there will be one or two directories
in your directory with the mod file.
They are named 'bin' and 'Build'
You should always delete them after you have compiled a mod!
If they are left there they will stop new changes from being compiled.
(The compiler looks and - ahhh it's already there! So nothing new...)
Title: Re: errors in tools-x64
Post by: kid1293 on September 06, 2016, 01:12:00 PM
Might as well continue -

If you want to change the Stone House, all you have to do is copy
the file StoneHouse.rsc from 'BanishedKit/resource/Template'
to your moddirectory with a 'Template' folder.  OK?

Open your StoneHouse.rsc and scroll down and find

BuildDescription build
{
int _workRequired = 45;

BuildRequirement _buildRequirement
[
{
ComponentDescription _rawMaterial = "Template/RawMaterialWood.rsc";
int _count = 24;
}
{
ComponentDescription _rawMaterial = "Template/RawMaterialStone.rsc";
int _count = 20; // (default = 40)
}
{
ComponentDescription _rawMaterial = "Template/RawMaterialIron.rsc";
int _count = 10;
}
]
}


As you can see I have changed the stone cost to 20.

Now you have to make some files in your 'stonehousemod-directory'
I have included them in the zip-file, but beware!
You don't have to change ALL the 'StoneHouse.rsc'
so you address it -
StoneHouse.rsc:build
only that section needs to be compiled. (the only thing changed)
like this (in the StoneHouseOverrideResources.rsc)

ExternalList resource
{
External _resources
[
"Template/StoneHouse.rsc:build"
]
}


You need a package file to actually 'pack' the mod after compiling.
Here it is (Package.rsc):

PackageFile StoneHouseOverride
{
String _name = "Stone House Override";
String _author = "me";
String _description = "This is an example";
String _icon = "icon.png";
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"
]
}


and finally a batchfile:

..\bin\x64\Tools-x64.exe /build StoneHouseOverrideResources.rsc:resource /pathres ../MyStoneHouse /pathdat ../MyStoneHouse/bin
..\bin\x64\Tools-x64.exe /mod Package.rsc:StoneHouseOverride /pathres ../MyStoneHouse /pathdat ../MyStoneHouse/bin


Important! You can see that I have named the mod 'StoneHouseOverride'
That MUST be the same in the batchfile and in the Package-file
(Never mind the directory - you can name it what you want)

And an icon 48x48 (on transparent bottom) in png-format

As I have said before: Ask, if you want answers!
Title: Re: errors in tools-x64
Post by: kid1293 on September 06, 2016, 02:49:07 PM
One more before I tuck in.
First test the last change I posted.

If you open your StoneHouse.rsc
and scroll a little bit more than before you find:

StorageDescription storage
{
RawMaterialFlags _storageFlags = Edible | WoodFuel; //(default = Edible | Fuel)
bool _areaBasedLimit = false;
bool _available = false;
int _volumeLimit = 1000;
}


You can see I have changed 'Fuel' to 'WoodFuel'
(everything after // is a comment and does not compile)
Now your stonehouse does not use coal for heating.

goto 'StoneHouseOverrideResources.rsc'
and add a line:

ExternalList resource
{
External _resources
[
"Template/StoneHouse.rsc:build"
"Template/StoneHouse.rsc:storage"
]
}

And you will have another change in the same modfile.
You can add changes for a lot of things.
(Of course you don't have to make changes in one building only.
You can change every single building with one override-file.)
Title: Re: errors in tools-x64
Post by: embx61 on September 06, 2016, 03:25:01 PM
QuoteJust a heads-up:
When you compile a mod, there will be one or two directories
in your directory with the mod file.
They are named 'bin' and 'Build'
You should always delete them after you have compiled a mod!
If they are left there they will stop new changes from being compiled.
(The compiler looks and - ahhh it's already there! So nothing new...)

Are you sure about this Kid?
I am doing it as you said for a final build to be on the save side but I recompile many times in between without deleting the build and bin folders and the changes I made are compiled.
I think the compiler 'see' changes made to files.

But I agree it is better save then sorry, that is why I delete the folders just before the final build.
Title: Re: errors in tools-x64
Post by: kid1293 on September 07, 2016, 03:16:38 AM
embx61 - Maybe you are right!
I always thought the compiler skipped the whole thing because it worked so fast.
I will make tests some time.

Then again - better safe than sorry.
Title: Re: errors in tools-x64
Post by: Pangaea on September 07, 2016, 07:14:36 AM
I've not modded for a long while, being away from the game, but based on the posts here it works the same as before -- at least this is roughly what I remember.

Quote from: kid1293 on September 06, 2016, 01:12:00 PM
You don't have to change ALL the 'StoneHouse.rsc'
so you address it -
StoneHouse.rsc:build
only that section needs to be compiled. (the only thing changed)
like this (in the StoneHouseOverrideResources.rsc)

ExternalList resource
{
External _resources
[
"Template/StoneHouse.rsc:build"
]
}


I just have an additional comment here. Doing it like above will make the mod files a little smaller (hardly a big issue these days, but still a good practice), but it will also likely make your mods more compatible with others. For instance, I made a mod that changed how long orchards live before dying, which changed the "growth" part of the .rsc file (if I remember correct), but also love to use the Better fields mod. This mod changes the same file, but a different part of it (probably pathType under map section). This means both mods can be used without any conflicts. With so many mods around and possibility for conflicts, it's a good way to go about things to reduce issues.
Title: Re: errors in tools-x64
Post by: Maxvdb on September 07, 2016, 09:16:58 AM
BuildDescription build  <= this is the build you are refering to in the ExternalList resource?
bla bla

StorageDescription storage  <= this is the storage you are refering to in the ExternalList resource?

bla bla



ExternalList resource
{
   External _resources
   [
      "Template/StoneHouse.rsc:build"      
      "Template/StoneHouse.rsc:storage"      
   ]
}

i downloaded your stonehouseoverride zip. run the batfile and it works:D

so my game can run mods. so that is good
but why doesn't it run my mods even the simple debugmenu wont show.

ps i want to thank everyone for helping and i tried everything i just think quoting and anwser everybuddy is a waste of time and doesnt make things any clearer (correct me if im wrong)
Title: Re: errors in tools-x64
Post by: kid1293 on September 07, 2016, 10:17:52 AM
first - yes those are the sections I am referring to.

and - I can see your error
here is what you wrote in DebugMenu.rsc

ExternalList resource
{
   External _resources
   [
      "Game/toolbar.rsc:options"
   ]
}


That would only make the button 'Options' available
You have to address the debug button

So - look further down in toolbar.rsc and find:
Toolbar debug : "base" {  bool _visible = true; Toolbar _parent = "reports"; int _sortPriority = 1200; Action _action = Utility; ComponentDescription _tool = "Template/UtilityDebug.rsc"; Keys _hotKey = Camera1; bool

In your DebugMenu.rsc you have to write:

ExternalList resource
{
   External _resources
   [
      "Game/toolbar.rsc:debug"
   ]
}


I wrote Game/toolbar.rsc:debug from the beginning.
You changed it. Why?
Try to compile and run the original and see that it works.

I understand if you are confused by there being a Package-file only.
It contains two sections.
The second section - 'ExternalList list' is actually the 'DebugMenuResources.rsc'
written inside the package-file.
It works either way. You just have to address it where it is.

Title: Re: errors in tools-x64
Post by: Maxvdb on September 07, 2016, 11:13:30 AM
I had it like

ExternalList resource
{
   External _resources
   [
      "Game/toolbar.rsc:debug"
   ]
}

But it didnt work and i thought try this.
As you can see on the first png of the cmd i had debug in stead of options
Title: Re: errors in tools-x64
Post by: kid1293 on September 07, 2016, 11:55:33 AM
Hmm...
I changed 'options' to 'debug' and compiled and your version works fine.
Well, you must have made more than one change.

You can send a personal message if you want anything else.
I am here almost every day and have (right now) time to kill.
Title: Re: errors in tools-x64
Post by: Maxvdb on September 07, 2016, 12:22:50 PM
Im right now on my mobile. And ist almost bed time:) did you started a game with the mod? And it showed? On my main menu it shows but it doenst appier on the toolbar
Title: Re: errors in tools-x64
Post by: kid1293 on September 07, 2016, 12:56:49 PM
Yes, did it all again. Downloaded (your DebugMenu2)
changed options to debug, compiled and it works.
Title: Re: errors in tools-x64
Post by: RedKetchup on September 07, 2016, 05:26:14 PM
Quote from: embx61 on September 06, 2016, 03:25:01 PM
QuoteJust a heads-up:
When you compile a mod, there will be one or two directories
in your directory with the mod file.
They are named 'bin' and 'Build'
You should always delete them after you have compiled a mod!
If they are left there they will stop new changes from being compiled.
(The compiler looks and - ahhh it's already there! So nothing new...)

Are you sure about this Kid?
I am doing it as you said for a final build to be on the save side but I recompile many times in between without deleting the build and bin folders and the changes I made are compiled.
I think the compiler 'see' changes made to files.

But I agree it is better save then sorry, that is why I delete the folders just before the final build.


i also often notice that, sometimes it bug or i dunno :P

this is the reason i always add +4 more lines at begining of my .bat :

cd WhiteHouse
rmdir bin /S /Q
rmdir build /S /Q
cd ..


that way i am always sure it does what i ask.
Title: Re: errors in tools-x64
Post by: Maxvdb on September 09, 2016, 07:26:57 AM
oke because it worked on your computer i knew the mod was fine but my system wasn't so i deleded the modfile unpacked the mod1.0.6 and tried again. packed the data files from steam run the build resource and example bat. the apairy mod worked. so i tried the stonehouseoverride that didn't work but it did before the reinstall. so i decided to read the README file again. and i found the bit saying

bin\x64\Application-x64-profile.exe /onlypkg

i made a .bat ran it and the debug and stone house override worked.   i think it's such a noob fault you oversaw it i guess.

so my second question is do u Always start it with that .bat?

thanks again:D
Title: Re: errors in tools-x64
Post by: kid1293 on September 09, 2016, 08:44:09 AM
Yes, it's what I have for any mod I make.
(are we talking about the same thing?)

You run a batch-file for starting the game. - bin\x64\Application-x64-profile.exe /onlypkg

I was talking about the modkit - running Tools-x64.exe.

There is so much that can go wrong, don't hesitate to ask.
But you have to tell more of the problem if we shall understand.
If I remember correct, your line of code tells the game to start with the newly
compiled mod - right?

Do you copy the mod to your Banished/Windata directory?
Maybe that's why it does not show up ??
Sorry for stupid question, but it's hard to get the picture of what's wrong.
Title: Re: errors in tools-x64
Post by: Maxvdb on September 09, 2016, 09:31:46 AM
I started it normally by going in folder x64 aplication

Now i created a batch file with onlypkg

Run that and it works


And i dont copy it in the dir folder just run the batch file

I have tested a few files changed somethings and they worked. So now i can start modding

Thank you very much
Title: Re: errors in tools-x64
Post by: kid1293 on September 09, 2016, 09:38:47 AM
Good news! :)