World of Banished

Conversations => Suggestions and Mod Ideas => Topic started by: tanypredator on May 09, 2016, 10:20:47 PM

Title: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 09, 2016, 10:20:47 PM
Hello! I like playing Banished and mods make it even better. But I still have several ideas that were not realised yet (or were realised in the other way from what I want), and I want to share them and to try making mods by myself. The problem is that I have never dealt with 3d-modelling and almost never - with programming. Some of this ideas must be very simple, like taking the part of someone other's mod (and this is were I hope for some advises for the beginner), some would require 3d-modeling and some are probably impossible - but maybe these may be realised in some alternative way. So here are my ideas listed in categories:

1) New animals
- dogs and cats
Would be a great addition. I see two ways of adding them. One is to make them like deers, but not huntable and with movement limited to occupied places - just for fun. Maybe a new ambient sound may be added to towns with barking and meowing. That would be pretty enough for cats, but not for dogs. To make dogs useful I thought of another way, which probably is impossible: to make them a new parallel race. To give them dog-houses and the need to eat proteins. To give them idling behavior of children. And to let them either work as hunters and herdsmen, or to work with them, increasing their productivity.

- new animals to hunt
As far as I can see, the only problem is to make models and animation. I would like to acquire these skills, but I am afraid it's not easy, becouse it is not done yet. Personally, I would like some game birds (wondering if they can fly) and maybe rabbits.

2) New plants
- wild plants
I would like to see new wild tree with a new model such as mountain ash or other high shrub with flowers and/or berries. Maybe make it to give both logs and berries. And flowers - I think of bushes with red flowers and small white or yellow flowers. They also may be used to make new "Decorative Items". One further idea that I have is to make little shrines to the gods of nature, producing flower decorations, encreasing happiness :). Another plant that I think about is some wild cereal to be gathered by gatherers (and busy workers). And the simpliest of what I want - to take reeds out of "beautifulworld" mod or to repeat them.

- new crops
I think about grapes and sunflowers. I know that these are already made in some big mod (Coloniel?), but I would like them alone, without changing game so much.

3) New behavior and such things
Must be most hard or even impossible. But maybe something may be done.
- The thing that I would like most of all - people to change clothes at winter! It is horrible to see them in their thin dresses in the snow forest. At least to change the color of clothes to grey, brown and black, pretending it is warm clothing.

- And trees to bloom for a month at spring and to be red and yellow for a longer period at fall! Doesn't it require only to make several new models and a simple time change?

- New idling tipes of behavior. For example the mod "Decorative Items" adds banches, but nobody will sit on it. And there are some other places to sit - docks, fences, ladders. Is it completely impossible? And to add tables to sit and drink ale :)


Maybe I have forgot something, but these are the most of my ideas. Now I have several stupid questions, because I tried to start with making mods, but have a problem at the very beginning.

- "Open a command prompt and change directory to the toolkit." That means I should:
Press Winkey+R to open the Run line and then enter "cmd" to open command prompt.
Then (I have read the forum :) ) "change directory to the toolkit. (C:\BanishedKit) by typing: cd banishedkit"? That is all? And I should press "Enter" after that, right?
"type and launch buildresources.bat" - means to type it in command prompt second to "cd banishedkit" and to press "Enter"?

- Would I be able to "open" someone other's mod to see its code, open its models in some 3d-editor? Or to open the game's own models?
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 10, 2016, 12:35:47 AM
Oh, and I have forgot something very important - building animation. I understend that it is probably impossible, because nobody have made it. But I can't understand, why? Trees are static objects (are they?), but they have animation - waving on the wind. What is the mechanism of them having it? Can't it be used to animate buildings?
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 10, 2016, 03:09:44 AM
 :) Hi @tanypredator !

Many of your ideas are impossible to do with the modkit.
Some should be possible but we don't know all variables and their use.
It's like having a fantastic new world to discover but no map.

About your modkit questions - there are many ways to learn.
Read old forum threads and you will find valuable stuff in there.
Here's one:
http://worldofbanished.com/index.php?board=43.0 (http://worldofbanished.com/index.php?board=43.0)
Try to get the code to small mods and overrides. Learn by experimenting
with something easy that is proven to work. Change a value - see what happens.
That's probably a bad advice to give but that is what I did.

The BuildResources.bat is pretty useless by it self, better just build the examples.
You can double-click on BuildExamples.bat if you just want to run it. This will close
the command-window after compiling. (If you get errors you probably should 'run cmd'
and have command-window open to see what happened in the code)
Now you have new files in BanishedKit/bin/WinData directory.
Copy them to Banished/WinData directory and you should see them in game menu.

When building a .pkm file the modkit creates two directories in each examples directory.
- in 'animal' directory there will be one 'bin' and one 'Build' directory. Just delete them.
- the same for each example.
They are used when packing the .pkm file and if you leave them there the program will not
create new files if you change something. So the next change will not be packed into your mod.

I have some small code in download.
http://worldofbanished.com/index.php?action=downloads;sa=view;down=90 (http://worldofbanished.com/index.php?action=downloads;sa=view;down=90)

Which leaves the important answer. Without the code you can NOT change or look at models
or variables. That's why most mods are edited versions of the examples mods!

Don't forget: Ask, ask, ask if you want to know something. The answer is out there. ;)
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 10, 2016, 03:33:45 AM
Thank you very much, kid1293!

I have read that threads, but they are mostly about the next steps of making mods - I had a problem with just beginning. That is said in ReadMe:
"1. Copy the .pkg files from the game data directory to where ever the toolkit is located.
2. Open a command prompt and change directory to the toolkit. (C:\BanishedKit)
3. Run the batch file BuildResources.bat. This is going to take a few minutes.
4. If all goes well, all resources will be compiled to binary format and be placed in /bin/WinData."

I was as far as "1. Copy the .pkg files from the game data directory to where ever the toolkit is located. 2. Open a command prompt" :)) I'm a bit afraid to work in this command prompt, because I have a feeling that I can easily break my computer through it.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 10, 2016, 04:57:57 AM
You don't HAVE to open a cmd-window!
In windows you double-click the .bat file and it runs fine.
The only problem is that the window closes on exit so you can not
trace back and check if all is OK. But if the program runs and does not halt
and show an error - all is fine.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 10, 2016, 05:33:06 AM
I thought of you being new to modding and probably need some more detailed
explanation to what happens:

Something easy. Debug Menu.

It is already in the game but it is not visible form the start.
I make an override-file to make it visible.

First create a new directory in the BanishedKit directory.
You name it 'DebugMenu'. In that directory create another directory
named 'Game'.

Copy the 'Toolbar.rsc' from BanishedKit/resource/Game to your new directory.

Open Toolbar.rsc in your directory and scroll down to find -

     Toolbar debug : "base"   {  bool _visible = false;  ....more text...

Change the 'false' to 'true' and save the file.

In your DebugMenu directory you need a Package-file with directions
about name and resources. Here is my 'Package.rsc'

Quote
PackageFile DebugMenu
{
   String _name = "Debug Menu";
   String _author = "kid1293";
   String _description = "Banished override to show in-game debug menu";
   String _icon = "icon.png";
   int _userVersion = 1.0;

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

ExternalList list
{
   External _resources
   [
      "Game/Toolbar.rsc:debug"
   ]
}

First the definition PackageFile with the name of your mod. You have to keep
that name in some other places too or you will have errors.
It basically tells your compiler to include all files in current directory.

Next section is ExternalList and this is where you tell what to compile.

I have written the place where you did your change to Toolbar.rsc.
I tell it to look only at the section 'debug' or else it will compile
the whole file and that can stop other peoples mods from their changes in
other sections.
(The first loaded mod in game menu with changes in the same section as
another mod (further down) is the only valid in the game)
Still wih me?
Next go make an icon. 48x48 pixels 24-bit png-format. (Don't know if .jpg works)
You can name it what you want, just write the same name in the package-file.

Now you should make a batch-file so you can compile your mod easiest way.
A lot to write and if you have to do it again, it is better to have it written.

Here is mine:
Quote
..\bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../DebugMenu /pathdat ../DebugMenu/bin
..\bin\x64\Tools-x64.exe /mod Package.rsc:DebugMenu /pathres ../DebugMenu /pathdat ../DebugMenu/bin

If you are running on a 32-bit machine you have to change all 64 to 32.

First line builds the parts of the mod. You see it looks in 'Package.rsc' in the section 'list'
('ExternalList' is not a name, it is a function) for parts to include.
Then it tells base directory for those files, and where to put the compiled code

Next line actually packs the mod from the parts done in the first line.
Here the name have to be exactly letter by letter what you have in the PackageFile. It is easy to
forget capital letters when writing a lot of code. (In this case 'DebugMenu')

Save the batch file as Build.bat and you are ready to double-click it and see what happens.
No problems I hope.

This is as detailed as I can do it.

When doing a lot of mods it easiest to just copy 'Build.bat' and Package.rsc'
and change the names inside them to suit each new mod.

Here are the source files if you want to check:
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 10, 2016, 07:14:53 AM
kid1293, that's really great, thank you!

It is confusing that I don't need to follow the instructions given by the author of the game.

I'm sorry, but I still can't get to it. I hope I understood right that the place for new directory "DebugMenu" is like (\BanishedKit_1.0.4.141123\DebugMenu), not in "bin".

So, I copied the Toolbar.rsc there, but I can't run it - I don't know with which application I should run it (and my computer don't know it too).
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 10, 2016, 07:25:36 AM
And as I can see this "In your DebugMenu directory you need a Package-file with directions
about name and resources. Here is my 'Package.rsc'" means that I should create a new .rsc file and again to open it and write the following code there. I'm sorry to be such a noob, but I don't know also how to create .rsc files :(
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 10, 2016, 07:28:57 AM
hello !

sorry if i dont have the time presently to answer all your questions but i ll answer them later. i just wanted to pop and say :
dont make a folder called : \BanishedKit_1.0.4.141123\DebugMenu

the game doesnt like the underscores and the dots because they can mean something else in the code. use \BanishedKit\ instead or you can get weird errors at some point.

i rarely use cmd prompt, i only double click the .bat files.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 10, 2016, 07:34:03 AM
RedKetchup, thank you. It was just the name of the BanishedKit file that I downloaded from the official web-site. I'll remember your advice.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 10, 2016, 08:24:00 AM
If you want to check you can download the code in my last message.
There I have written all you need.
Thanks RedKetchup for clarifying.

The root folder is called BanishedKit
Your mod folder is called DebugMenu.
You should be able to run it from there.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 10, 2016, 09:19:18 AM
Oh, wow. I could open this .rsc like .txt with, well... notepad? Not sure in its english name. Only I'm still not sure about creating a new .rsc, but I probably can make a copy of some other .rsc and change it.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 10, 2016, 09:40:30 AM
1) New animals

any new animals are always very welcomed :) and everyone wish there are alot more. it is very very complicated to make animals and their animations. i made tons of things but i never could learn and understand how to do animal, their bone rig, and their animations.

animals can only be : wild (wandering) or domestical (in pastures). we cannot make a wild one that can be not huntable. the moddkit is very weak and doesnt allow to do lot of things. we cant change the game mechanics (like make a wild not huntable)
we cannot make a new race, nor giving them an house (house like citizens) and make them eat

but you can make a mini pasture like 1x1 or 1x2 and draw a dog house and a bowl... and the animal would stay in his 1x2. you can set up this pasture to max 1 animal.
but what i can be scared is : no control in the menu to only put 'dog' in it and not a sheep or a cow :P ( @kralyerg  can maybe elaborate on this)

birds can fly ... at certain point : it all the animations part of the animal. CC added one. maybe it doesnt superbly 'fly' but that all depends the time and the number of work you put into it.
if you put 200 hrs, the animation will be more beautiful than if you put only 20 hrs.


2) New plants.

alot of new plants and all the vegetable/fruits have been made already. unfortunatly, they all part of the big CC mod.


3: New behavior.

thats a part of the moddkit we cannot do anything about it. we cannot change the game.
you can change the cloths they wear but you cannot change the behavior of having summer cloths and winter cloths.
you cannot make sit and make citizen do something special. 100% out of any control.

Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 10, 2016, 09:42:10 AM
Quote from: tanypredator on May 10, 2016, 09:19:18 AM
Oh, wow. I could open this .rsc like .txt with, well... notepad? Not sure in its english name. Only I'm still not sure about creating a new .rsc, but I probably can make a copy of some other .rsc and change it.

right click on a .rsc file (not the .crs) and choose the option of 'open with' and give and select the notepad and check the box to always open with it. and click OK.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 10, 2016, 09:51:27 AM
Quote from: RedKetchup on May 10, 2016, 09:42:10 AM
right click on a .rsc file (not the .crs) and choose the option of 'open with' and give and select the notepad and check the box to always open with it. and click OK.

Yes, that is what I have done, thank you. Now I have to study all this examples and advises. There would be more questions, I'm afraid :) Sorry if it take some time.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 10, 2016, 10:04:06 AM
Quote from: tanypredator on May 10, 2016, 09:51:27 AM
There would be more questions, I'm afraid :) Sorry if it take some time.


no problem :)

i always come check in here once or 2 times per day to see if something special :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 10, 2016, 10:49:31 AM
:) Glad to help.

My knowledge is also limited. I have to ask for help too.
I will answer as clear as I can.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 11, 2016, 06:03:25 AM
kid1293, I was able to repeat your DebugMenu mod, thank you very much!

Now I have just downloaded 3d-software "blender" and I am going to try to open some .fbx models with it.

I have a question. There are some .fbx files in examples and in your mods here (http://worldofbanished.com/index.php?action=downloads;sa=view;down=90), but I can't find the game's own models. Are they really unavailable? And is there any possability to open game's animation files (which I can't find too)?
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 11, 2016, 11:31:15 AM
Glad to hear that you were able to do the example.

Sorry to tell this - Luke never gave us his resources. (textures, models, animations...)

Blender is really another thing to begin with.
I tested .fbx files and tried to model for over a year until
I told myself to read the manual. I read a couple of pages
and then it was back to trying. One day I managed to get a model
into the game. It was useless :) You can find the thread about
Garden Shed in the forum. Then I got help and slowly started to
solve my problems one by one.

I wish you luck, though, but take your time and be comfortable with
Banished Modkit and know it's limits. That way you don't start too
large projects with Blender. I do houses now but I can not learn how
to curve a wall so it's always square.

Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 11, 2016, 12:19:17 PM
Thank you again, kid1293. I agree that I should begin with something more simple, only most simple things are already done :) But surely I'll study them. However I'll have to learn to use such prorgams as blender if I want to do any interesting mod, and that is good motivation to study :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: Tom Sawyer on May 11, 2016, 12:38:37 PM
Hello,

welcome to modding and keeping alive this nice game. It's fun to do something with the game. But it can also be frustrating. Creating new 3d models is the high art of modding and difficult, if you're inexperienced. My respect for the guys who create good models. It is a pity that the developer does not share his models. But I can understand it. It's hard work to make it in this quality. I agree with Kid and recommend you to start with something simple to get to know the modkit, step by step. From your suggestion list the best part to start is to make new clothes for the citizens, for example. It is really horrible to see them in winter.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 11, 2016, 01:01:56 PM
you have 1 animal/animation available : the chicken leghorn example in your example folder
about blender i will never be able to help you out with it, i always used 3dsMAX

if you are still student, you can get it free.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 11, 2016, 08:44:50 PM
Tom Sawyer, thank you. I would like to change citizen's clothes, but seems to be that it is only possible to give them one complect for all seazons. Maybe there is some hidden way to make their clothes changing, but a noob like me couldn't find it. And I think it too would require 3d-modelling.

RedKetchup, I have chosen blender because I found some mentions that it can import and export .fbx files, and it is free, and it has animation too. I'll try to to study it's manual, and use it. If I fail, I'll search for some other software, but I'm not a student.

Just for now I'm thinking of one small mod, that shouldn't be very hard to do, and would require very small 3d-model: something like a campfire, 1*1 circle of stones having fire effect, increasing happiness and (maybe) used to get warm. That means I'll have to make this circle and then mostly to use code for well with some modifications.

Why there are so many .rsc files for each mod, with cross-references? Why can't be all code written in one .rsc file?
Title: Re: Some ideas for mods and some questions about making mods
Post by: Tom Sawyer on May 11, 2016, 11:40:45 PM
You are right. There is no way to change the look of clothes depending on seasons or temperature. But i think this is not a need. A need for me would be a change of the look by different kinds of clothes (leather coat, wool coat etc.) And item slots for pieces of clothing and for tools, like in a rpg. But this is a dream that will not come true.^^

The many files in the modkit make sence. Its a modular system. Just take it as it is.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 15, 2016, 06:28:35 AM
While I am studing how to put a texture on the object in blender :) I've got one more question. I wanted to make very small mod that only changes the density of orchards to 2*2. I changed Orchard.rsc and it worked well, but when I tried to put it into a mod, it didn't build mod, because (as I understood) this Orchard.rsc references to many other files. So how can I make it into a mod? Should I copy all that files to which Orchard.rsc has references into my mod folder? And to put them into "ExternalList list" in the Package.rsc?

UPD. But the example mods don't contain everything to what their files have references.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 15, 2016, 06:53:15 AM
@tanypredator
Orchard does not need other files when just changing 'heightspacing'
There must be some other error.

Here is quick source for changing orchard to 2x2.
Check it and compare what you did.

Edit:
I may have a clue to what you did wrong.
You don't name the section you are changing right
so the program either tries to compile all of 'Orchard.rsc'
or there is an other mistake in 'Package.rsc'

I have added another file with an added change of size
now you can have a 1x1 orchard with a 2x2 spacing

Of course - if you build a 1x1 orchard you will have one tree only.  :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 15, 2016, 07:07:59 AM
Thank you very much, kid1293, that works perfectly!

I did all the same, only
"Template/Orchard.rsc:orchard"
was just
"Template/Orchard.rsc"

Can you please explain me, how could I know next time, which word must stay in that place?
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 15, 2016, 07:10:10 AM
I was editing last post when you posted again so check two posts back.

There is a hint of how you must name it.
search for 'createdrag'
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 15, 2016, 07:12:47 AM
Eh, yes, thank you, sory for my stupidness  :-[

While waiting for your answer, I opened this Orchard.rsc and found

OrchardDescription orchard
{
   ResourceLimit _resourceLimit = Food;

   int _widthSpacing = 2;
   int _heightSpacing = 2;
   float _growthPercentOnTend = 0.005;
}
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 15, 2016, 07:20:24 AM
No problems, noone is stupid who ask for answers.  :)

The Pear Tree of Life. A whole community is guarding it!
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 15, 2016, 10:26:26 AM
Quote from: tanypredator on May 15, 2016, 07:12:47 AM
OrchardDescription orchard
{
   ResourceLimit _resourceLimit = Food;

   int _widthSpacing = 2;
   int _heightSpacing = 2;
   float _growthPercentOnTend = 0.005;
}


you dont need always to process all the functions that are in a specific .rsc You can do just a little part or just a function.
the way to do to jump to a specific function is the format : " name_of_the_file:name_of_the_function "(or "paragraph" i call them)

here in your example :
OrchardDescription = the internal call for a function
orchard = the name of the function or paragraph


and the way to call that paragraph in your example:

Quote"Template/Orchard.rsc:orchard"
Template/Orchard.rsc = the name of the file
: = 'jump to" or "go to"
orchard = name of the function


*************


sometimes it happends that we need to supply an extra file or 2, mostly they are in the 'dialog' folder. you just need to add a copy of the dialog file into a folder which you will name "Dialog" and you ll put the copy of the .rsc in that folder
this is mostly ShareElement.rsc , StandartDialog.rsc , Work.rsc , CropField.rsc , and a few other more rare.

you dont need to call them. if the toolkit needs it, it will call them by itself.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 15, 2016, 10:20:48 PM
Thank you, RedKetchup! So, I can put this files in the mod folder and not to specify their use in Package.rsc and that will be ok.

The one thing that I'm still confused of is that there are references in example mods to the files that are not placed into their mod folders. For example, in the apiary mod there are

StatusIconDescription statusicon
{
   SpriteSheet _spriteSheet = "StatusIcons\BuildingIconSpriteSheet.rsc";

and

Particle _particle = "ParticleSystems\Fire\FireMedium.rsc";

but this files are not put in the apiary mod folder. How can this work?
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 16, 2016, 12:14:29 AM
Some files are referenced and the program gets them from the gamefiles by itself.
It's rather easy to learn, as RedKetchup said it's only a few that needs to be copied.

The compiler stops at an error and tells what file is wrong/missing. So after a few
run of the compiler you should have all the files you need. :)

Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 16, 2016, 12:37:27 AM
Thank you again, kid1293! I'll try and if I get a result, I'll bring it here.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 16, 2016, 01:15:27 AM
those 2 the compiler easily finds them in the /resource/folder and need to NOT be provided.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 16, 2016, 09:53:45 AM
Well, I made some very primitive model and tried to make a mod with a fire pit. I used code for apiary and well. But when I tried to build it, it breaks with "Warning: Failed to load recourse 'C:\Tany\games\banished mod\modding\BanishedKit\FirePit\bin\Package_list.crs'   Object\ExternalFactory.cpp(359)". Could you please advice on this?

I attach my files.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 16, 2016, 10:47:18 AM
You have moved your listfile to FirePitResources.rsc
but you address Package.rsc in your bat-file
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 16, 2016, 11:13:01 AM
Yes, I forgot that there is one .bat file for all examples which I should look to check myself. But I changed it to FirePitResources.rsc in my Build.bat and it gives the same mistake, only

"Failed to load resource 'C:\Tany\games\banished mod\modding\BanishedKit\FirePit\bin\FirePitResources_list.crs"
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 16, 2016, 11:46:15 AM
FirePitResources.rsc:resource

and I checked very quick. there are a lot of strange things
I just can't continue right now. But I will have a look
at the code.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 16, 2016, 12:15:08 PM
Oh. Thank you for help. Now it starts building, but there is some problem with a texture of a model. There is a "material" and "texture" in the blender, and as I understood I should make some material to apply a texture, but I didn't know that it is important - now Build.bat requires .rsc file for my material. I would have to work this out.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 16, 2016, 12:34:01 PM
I've had your problem with Blender.
I solved it 'my way' by naming everything equal.
I don't say that is the right thing to do.
You better start experimenting, but first look at your
Blender file from firepit and check if you really have
'terra.001' in it. It could be that conversion to fbx
makes something (I never found out) and you end up
with 'terra.001' instead of just 'terra'.
I'll try this side and see if that's the culprit.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 16, 2016, 01:15:28 PM
before you go any further you need to fix something : 'C:\Tany\games\banished mod\

this kind of path and folder names are very bad.

no strange caracters, nor underlines, nor spaces are allowed when working with the kit. sometimes it can pass but very often it leads to errors

take the habit to use this kind of format instead to put spaces \BanishedMod\


***************

not sure about how blender works but the name of the controller of your texture need to be the same as the name of your texture (minus the .extention)
for example, a texture name : "Brickwall256.png" , its texture controller name need to be "Brickwall256". the game and the toolkit doesnt look at the texture but it searches the name of the texture controller. whatever the name is, it will search to apply the texture meeting this name.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 16, 2016, 01:37:19 PM
Agree with RedKetchup. Check your path.

I did not take notes of what I did.
I redid most of sizing in model.
I changed name in model and code.
Removed some and put some back.

@tanypredator - You have a wonderful idea with FirePit!
I leave you the code as I use to have it. Now I think it works.

General tip - if you use meters and save the model with 0.025 in Blender
strange things happen. I always use 0.010 and it works.
So first get right size and location. Apply (in object mode) location and
scale, then resize x,y,z to 0.010 and save fbx.

Edit: I removed roadtiles so now it is 1x1. You can always change back. :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 16, 2016, 09:48:49 PM
kid1293, RedKetchup, I am so grateful for your help!

kid1293, I would have to learn more about blender. I have read about using meters, but I didn't find this setting in blender yet. Thank you for testing and correction of my mod! Only I wanted the fire there, like the smoke from houses. But I'm not sure if it is possible.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 16, 2016, 10:29:53 PM
From what I know it is only possible to have an open fire
when a house is burning.
If your FirePit should catch fire the little people will
quickly put the fire out so it will be a weird situation.  :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 16, 2016, 10:31:23 PM
UPD. I think about adding a new particle system - new fire in this case - had anybody tried this?

And I also want to make grapes in my second mod, so I tried to understand the tree example and I have few questions. There is one texture .png file with both winter and summer appearance of branches. How does it chooses one of them? And would it work if I change the form of the tree - for grapevine must be bended and horizontal at the top. Does it use Material\Billboard\BillboardMaterial.rsc to change between winter and summer appearance?
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 16, 2016, 10:36:43 PM
Quote from: kid1293 on May 16, 2016, 10:29:53 PM
From what I know it is only possible to have an open fire
when a house is burning.
If your FirePit should catch fire the little people will
quickly put the fire out so it will be a weird situation.  :)

I thought that it might be so. But I couldn't find any code about this behaviour. The only thing that I've found was resource\Template\Common.rsc where the amount of water (and time) for putting the fire out is described. That's why I have thought about adding a new particle system. And the other problem is that it seems to be that I can't add "warmth" to anything but houses.
Title: Re: Some ideas for mods and some questions about making mods
Post by: Tom Sawyer on May 17, 2016, 12:35:36 AM
Quote from: tanypredator on May 16, 2016, 10:36:43 PM
And the other problem is that it seems to be that I can't add "warmth" to anything but houses.

That could be the way to realize your idea. To define it as a residence. Citizens are going to the next residence to warm up and thats a fact of core game I think. For a residence you can set the params of fuel and citizens have to bring firewood to it... As "fire" you can use the chimney smoke effect. Look at the Minibuilding mod. There is a campfire with standard smoke but as a "hunting lodge". Unfortunately, someone has to live on your fire to make the smoke effect.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 17, 2016, 12:47:05 AM
@tanypredator - A new particlesystem is possible but how to make it stay?
I've tried _addOnCreate, _addOnNotify, _visible - nothing.

Maybe as @Tom Sawyer    said you have to live there or have someone to tend
the fire to make the smoke stay.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 17, 2016, 12:55:09 AM
So I should  either make some tent aside the fire pit as a house, or make this fire pit a workplace. That is a way, but that limits either realism or   aesthetics. And anyway I would have to use smoke or to edit fire effect - it is too large. I'll work on it. And there may be one more posiibility - to add new particles effect in blender to the model itself, but I strongly doubt it would work.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 17, 2016, 01:57:29 AM
The fire seems limited to burning buildings.
I don't know about replacing smoke particle animation with fire
but it should work just by referencing the other. Maybe the
compiler wants resource files, then you hit the wall.

Another way could be a church, always attended and brings comfort.
(Holy circle - sorry, couldn't help it.)

To your idea of making a new particle system - count the velocity of the particle
and the lifetime of it and you get an estimate how big the fire will grow.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 17, 2016, 02:19:04 AM
Yes, to change fire parameters is what I'm going to try now (when I have time). But I'm not sure if I can use only FireSmall.rsc in my mod folder, referencing to FireMaterial.rsc and FireTexture.rsc in \resource.

And what I'm thinking as another way is to make particles a part of the model. I mean that as I can see, animation of trees and animals is inside their models.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 17, 2016, 03:24:26 AM
Don't use FireSmall.src.
copy it / rename it / link it
I PM you a code for a church with smoke changed to fire
and a modified fireparticle-file the fire needs tweaking
but you get the picture.

Picture:
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 17, 2016, 03:39:27 AM
Great!
Quote from: kid1293 on May 17, 2016, 03:24:26 AM
copy it / rename it / link it
That is what I meant, only not sure about "link".

Why church? Would it need worker? If the fire effect may be achieved without a worker, it may be left as decorative (only I'll try to make a better model), and a tent with fire made separately to make it warming (not sure I'll do that, I want to go forward to grapes and a new blooming tree).
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 17, 2016, 03:53:46 AM
I tested some and it looks like a 'building' has to
be occupied for the smoke to come.
It must have been written in the game-engine and we can not change it.

To be honest: the fire does not look too good. Maybe better to stay with
a modified smoke-file...?
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 17, 2016, 04:02:36 AM
kid1293, yes, though I'll try different positions of "smoke" point. And probably I have to make either a tent with a fire pit with smoke, or a little temple construction with a little fire (if I could make it to look better). This last may be in combination with my "temple with flowers" idea. Anyway, thank you very much. I'll try to make something more beautiful as fast as I can.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 17, 2016, 04:52:40 AM
You're welcome :)

Have a nice modding journey!
Title: Re: Some ideas for mods and some questions about making mods
Post by: Tom Sawyer on May 17, 2016, 11:05:29 AM
Quote from: kid1293 on May 17, 2016, 03:53:46 AM
I tested some and it looks like a 'building' has to be occupied for the smoke to come. It must have been written in the game-engine and we can not change it.

@kid1293, thats right. The game knows 2 events for buildings to start a particle system: burning (index0) and working (index1). The index is used in the particle definition from the template of the building as you know. So we could make different effects for every kind of building and event. But the events themself are core game and must be triggered to start particles. A residence is working if inhabited. Tany can make a fire as a residence with 0 apartments and maybe it could work to warm up, but no particles would be there.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 17, 2016, 11:50:42 AM
@Tom Sawyer
Are these indexes triggered by specific points
(pointsdefinitions like smoke / fire) ?
I guess it is so because when I attach a fire to a smokepoint
it burns just like does not know where it is.

@tanypredator and Tom
Sorry for interrupting this thread. Shouldn't we have a new
modding thread with a small focus on Blender?

I'll check back later this evening and read what you have to say.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 17, 2016, 11:58:23 AM
Quote from: kid1293 on May 17, 2016, 11:50:42 AM
Shouldn't we have a new
modding thread with a small focus on Blender?

I think it would be great! Blender's manual is not so bad, but there are some moments specific to making models for Banished, and useful hints that you, experienced modders, can give to noobs :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: Tom Sawyer on May 17, 2016, 12:46:00 PM
@kid1293 The index is only used to assign the particle system to the event by the position in the particle description. That's all. The index for burning is defined in the common.src as "int _particleIndex = 0;". So the first in the description is used for burning and the second for working like this...

ParticleDescription particle
{
   ParticleAttachment _systems
   [
      //Burning
      {
         Time _fadeInOutTime = 2.0;
         bool _addOnCreate = false;
         bool _addOnNotify = false;
         Particle _particle = "ParticleSystems\Fire\FireSmall.rsc";
      }
      //Working
      {
         bool _addOnCreate = false;
         Particle _particle = "ParticleSystems\ChimneySmoke\ChimneySmoke.rsc";
         String _attachNode = "smoke";
      }
   ]
}


The point for smoke (attachNote) is another think. If you attach the fire effect to working (second position), the whole houses are under fire and it looks like the effect ignores the point. I suppose the reason is the large particle size of the fire effect. Set it to 0 and the fire should come directly from the chimney.

A thread for Blender would be nice. I'm a noob in Blender but need to use it.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 17, 2016, 01:03:57 PM
So by editing Common.rsc you may get additional index points?
That would be nice. But is it possible?
Title: Re: Some ideas for mods and some questions about making mods
Post by: Tom Sawyer on May 17, 2016, 01:31:18 PM
@kid1293 You mean additional points for smoking from the building like two chimneys? This has nothing to do with the index and we can't define additional attachNotes. Maybe we can make more smoke points in the model. (?) I don't think so, but let's try it.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 17, 2016, 01:49:22 PM
First - I now the fire effect will be extreme large if I put it on a smoke-point
but I edited a copied/renamed fire-particle file to a very small slow fire.

Second - too bad, no additional attachNotes (isn't it attachNodes?)

Third - A second smoke must be possible:
under '   ParticleAttachment _systems '
you can create a new smoke paragraph with {  } (start/end)
and just assign 'smoke1' to that.
And you just define another point in the mesh.
...or no?
Title: Re: Some ideas for mods and some questions about making mods
Post by: Tom Sawyer on May 17, 2016, 02:49:59 PM
1) Cool, you made a new particle system. Its just a texture, animated by a text file. All we need is to understand the parameters.

2) The attacheNode is the param to say the compiler, that's the name of the point in the model to locate the partical system. No way for an additional attacheNode in the source file.

3) I think that's impossible. A new item in the particle description would be ignored. Because index0 on burning, index1 on working and your new index2 on nothing. Lets try but it would be strange if it works. The only way would be a second point in the mesh with the same name ("smoke"). So the game could attach 2 points by the attachNode "smoke". But it would be strange too.^^
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 17, 2016, 03:03:09 PM
Quote from: kid1293 on May 17, 2016, 01:49:22 PM
and just assign 'smoke1' to that.
And you just define another point in the mesh.
...or no?

in the mesh you put another dummy name smoke1... smoke2.... smoke3.... how many you want

in your building.rsc in template, in the particle system function, you put a copy of the paragraph with smoke1... smoke2... smoke3...
(like my Old Smokery, there is 4 smoke points - 1 at each window of my smokery tower)
Title: Re: Some ideas for mods and some questions about making mods
Post by: Tom Sawyer on May 17, 2016, 03:31:53 PM
Thanks @RedKetchup. That's interesting and i have to correct myself. The rule is index0 on burning and index1..n on working. So we should be able to attach many different particle systems to a building. For example smoke from the chimney and a small fire effect on the workplace of a blacksmith.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 18, 2016, 09:15:35 AM
Don't forget BoatWake and CropInfestation

They're just modifications of the particle system but it shows that it is possible modify.
Title: Re: Some ideas for mods and some questions about making mods
Post by: DesoPL on May 19, 2016, 02:29:36 AM
Personally i could love some new models for vanila town hall and others buildings. :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 19, 2016, 08:52:24 AM
@tanypredator
QuoteAnd I also want to make grapes in my second mod, so I tried to understand the tree example and I have few questions. There is one texture .png file with both winter and summer appearance of branches. How does it chooses one of them? And would it work if I change the form of the tree - for grapevine must be bended and horizontal at the top. Does it use Material\Billboard\BillboardMaterial.rsc to change between winter and summer appearance?

Change the form -
All I can say is that the game uses a transparent texture so it is probably overlayed and you
should be free to bend it. But try to keep it as far as the original picture go, you never know if
there will be branches modelled to raise up.

Winter/Summer - I never seen any discussion about it. I simply don't know. Experiment.  ;)
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 19, 2016, 09:15:34 AM
Sometimes I get distracted from my current "tent" mod and look heavily on this Material\Billboard\BillboardMaterial.rsc  ;D It is all about graphics - of which I know nothing. I suppose that at the spring green texture emerges to "cover" the branch texture, and at autumn it changes gamma, then vanishes. And I suppose that it might be possible to inject a third texture to be between them (or also the fourth for a long red and yellow autumn), but it is a task for really experienced modder.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 19, 2016, 11:13:49 AM
i am far from to be enough experience moddler to go start to play with that ! lol
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 19, 2016, 12:43:11 PM
Neither am I, but if we all try different angles it could solved?

@RedKetchup - Is it ok to put a new message board here in
'Suggestions and Mod Ideas'  that will cover some basic modding
and with focus on Blender? I don't know where to place it.  :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 19, 2016, 06:31:45 PM
tutorial section would be better

http://worldofbanished.com/index.php?board=43.0 (http://worldofbanished.com/index.php?board=43.0)
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 20, 2016, 04:35:16 AM
Finally, thanks to the great help of kid1293, here is my first mod - the tent with fireplace. The fire is still not ideal, but it really requires a long experimentation. But now I am sure that it is possible to make any kind of fire or smoke - different sizes and colors - by changing the parameters of ParticleSystem .rsc file.

Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 20, 2016, 04:45:19 AM
@RedKetchup - I'll do that even if it's more of a discussion.

@tanypredator - see you in Blender section
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 21, 2016, 08:15:33 AM
Can't finish my mod again :( It is compiled normally (after I corrected some mistakes), it appears in the list of mods, but oats just don't appear. Not visually, not gathered by gatherers. I tried to change its spawn parameters (first I wanted it to spawn by itself, but then added spawn by trees), but nothing helped. Can somebody please look at it?

PS. I'm not sure at all about the size of model, just can't check it in game.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 21, 2016, 09:32:49 AM
Oh yes, it's there but pale and maybe small.

The gatherers collect it but get nothing in their inventory.

?
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 21, 2016, 09:38:36 AM
Quote from: kid1293 on May 21, 2016, 09:32:49 AM
Oh yes, it's there but pale and maybe small.
The gatherers collect it but get nothing in their inventory.
?

Hm, I searched it thoroughly and couldn't see. Then I'll increase model and look in the code for mistake about inventory. Thank you!
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 21, 2016, 11:13:56 AM
I increased model (but I think it must be even more big), but I can't get gatherers to show it in inventory. I thought it might be because I haven't added "Template/GathererShelter.rsc:autopickup" into WildOatsResources.rsc, but I put it there and no result. Maybe it would help if I add a new building and profession to gather oats.

PS. Added "Template/Profession/Profession.rsc:laborer" - still without affect.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 21, 2016, 11:38:41 AM
what is happening when the citizens pick it up ? did you created a RawMaterialOats.rsc ? and this raw material does it has it own 3d mesh,stingtable,sprites and icons ?
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 21, 2016, 12:13:26 PM
Quote from: RedKetchup on May 21, 2016, 11:38:41 AM
what is happening when the citizens pick it up ? did you created a RawMaterialOats.rsc ? and this raw material does it has it own 3d mesh,stingtable,sprites and icons ?

Yes, everything in place, the source is up there in previous posts. But there was something strange with the model of oats basket, so I'm now testing a new one.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 21, 2016, 12:30:37 PM
Here is what I have now. I think the model is not so bad, but still nothing gathered. When gatherers pick it, it just disappears, I haven't seen my crop model dropped. And nothing gathered as a result.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 21, 2016, 01:22:39 PM
So far no solution but some small errors:

  quotation marks in

RawMaterialWildOats.rsc

ValueDescription value
{      ...
   String _stringName = "WildOats";
       ...      
}

Maybe you should look later in Resource/Template/ClearWild.rsc
Don't know if it's only to remove resources when building ?

See you.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 21, 2016, 09:36:28 PM
Quote from: kid1293 on May 21, 2016, 01:22:39 PM
  quotation marks in
RawMaterialWildOats.rsc
ValueDescription value
{      ...
   String _stringName = "WildOats";
       ...      
}
Maybe you should look later in Resource/Template/ClearWild.rsc
Don't know if it's only to remove resources when building ?
See you.

It is just the same as in RawMaterialLettuce.rsc (String _stringName = Lettuce;), but I'll try to change it.

Actually I wanted to make a separate building and profession and, maybe, the same tool as in Busy Workers (especially because I want to add more flora and to change herbs' model), but I assumed that it would be faster to check the work of mod by using gatherers. So now I'll try first to add building and profession.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 21, 2016, 09:55:11 PM
I think it should work with a gatherer or
just a worker if you select the oats to be harvested.

I have rebuilt your fbx - nothing was wrong
I have checked code - nothing wrong what I can see.
(compared it to blueberry and some others)

You should get the code working before you dive in too deep
and build a new house
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 21, 2016, 10:26:33 PM
I correct myself :)

Start building.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 21, 2016, 10:31:34 PM
kid1293, I'm not sure I understood right - you made citizens to gather it, so problem is in Gatherers Shed, so new building will help? Great, thank you!

I have to admit that crop model doesn't look good, I have to improve it.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 21, 2016, 10:34:59 PM
No, citizens DON'T gather it.
I've tried but no...
It was a gatherer who took it.
I goes to the barn and people eat it.
So for now it's only to make citizens too.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 21, 2016, 10:40:17 PM
this is what i did
ExternalList resource
{
   External _resources
   [
      "Template/NaturalResourceWildOatsGrass.rsc"      
      "Template/RawMaterialWildOats.rsc"
      "Template/GathererShelter.rsc:herbalist"
      "Template/NaturalResourceTree.rsc:spawn"

//      "Template/GathererShelter.rsc:autopickup"
//      "Template/Profession/Profession.rsc:gatherer"
//      "Template/Profession/Profession.rsc:laborer"
   ]
}

changed the references to Profession.rsc (in GathererShelter.rsc and NaturalResourceWildOatsGrass.rsc)
back to original :
   Profession _requiredHarvestProfession = "Game/Profession/Profession.rsc:gatherer";

and removed the profession file from your folder
nothing is changed so you don't need to call it,
the same for autopickup.

Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 21, 2016, 10:57:59 PM
Oh. Got it. Thank you very much.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 05:21:17 AM
Had anybody ever tried to put files of one of conflicting mods, that are modified game files, into "resource" folder before building another mod, to try if they would be compatible?
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 05:51:58 AM
I don't think so. Have you? :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 06:04:48 AM
No yet. Only had this idea crossed my mind.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 06:15:59 AM
You mean someone elses modified gamefiles?
Then you should put them in your own folder
and build them together.

Or do you mean the compiled .pkm file?
The game does not have any references to that
so it won't get loaded.

Changing the gamefiles in resource and leave them there
is not to be recommended.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 06:30:14 AM
What I mean. For example, if I take the GathererShelter.rsc from Template folder, modified with "Tree of life". Put it into Template folder in resource folder of ModKit (it may be an extra copy, so no problem afterwards). The same way with all other new or modified files. Put my       "Template/NaturalResourceWildOatsGrass.rsc" in that modified GathererShelter.rsc. Then run build.bat of my oats mod. Wouldn't it be the version, compatible with "Tree of life"?

Not that it is necessary for this particular mod, but maybe for some other.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 06:37:22 AM
Yes, it should do the trick. But...
...and maybe make your mod incompatible with all other mods
compiled with the ordinary resource files.

Edit: I had to think.
If you reference your new gatherer file in resource then
all other who  change gatherer must have your
file or else they all be incompatible.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 07:02:26 AM
Probably, you are right. Although it may be tested. Maybe I'll test it when I have time.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 09:54:28 AM
I'm very sorry, but I need help again :( I made that building for oats gatherer, but can't get it to appear on the toolbar. I had already tried dozens of corrections, but nothing helped :(
Here is the source. Can somebody, please, check it?
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 11:10:18 AM
In  OatsGathererShed.rsc I added the second pointlist
Quote
InteractDescription interact
{
   PointList _pointList = "Models\OatsGathererShedPoints.rsc";
}

ParticleDescription particle
{
   PointList _pointList = "Models\OatsGathererShedPoints.rsc";


   ParticleAttachment _systems
   [
      {
         Time _fadeInOutTime = 2.0;
         bool _addOnCreate = false;
         bool _addOnNotify = false;
         Particle _particle = "ParticleSystems\Fire\FireSmall.rsc";
      }
   ]
}

Your new WildOatsVer2.rsc in your main folder:
Quote
Toolbar base
{
   StringTable _stringTable = "UI/WildOatsVer2StringTable.rsc";
   SpriteSheet _spriteSheet = "UI/WildOatsVer2SpriteSheet.rsc";
}

ExternalList resource
{
   External _resources
   [
      "WildOatsVer2"

      "Template/OatsGathererShed.rsc"

      "Template/NaturalResourceWildOatsGrass.rsc"      
      "Template/RawMaterialWildOats.rsc"
      "Template/NaturalResourceTree.rsc:spawn"
   ]
}

Toolbar WildOatsVer2 : "base"
{
   Toolbar _parent = "Game\Toolbar.rsc:food";   
   int _sortPriority = 700;

   Action _action = Tool;      
   ComponentDescription _tool = "Template/OatsGathererShed.rsc";         

   bool _autoHotKey = true;
}

Have to go a while.
I KNOW your people run off the map when building.
I'll check later
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 12:45:01 PM
OK. There IS a problem with Blender and scale.
You could see that people run away with wood/stone
and place it far off when building.

Edit: the problem seems to be with points!

I isolated all: build01, mesh, points as scale 1.000 (cleaned double references / .001 references)
(I moved all 1 tile to the left because of footprint. You may have to adjust it.)
Then I imported each part in scale 0.010 (don't know, but it looks like centimeters)
saved fbx (and Blender) and it works.

Edit2: Just call it 'Oats Gatherer' because of text limit in house menu.
Title: Re: Some ideas for mods and some questions about making mods
Post by: Discrepancy on May 24, 2016, 07:17:45 PM
Quote from: kid1293 on May 24, 2016, 12:45:01 PM
Just call it 'Oats Gatherer' because of text limit in house menu.

It is possible to change the width of the UI box to fit a longer name.

Make a copy of Dialog/StandardDialog.rsc and put it in your mod folder, rename it to something else like OatsStandardDialof.rsc or similar.

Within your gatherers template .rsc file, scroll to the bottom where it lists the UIDescription, change the link to StandardDialog.rsc to that which matches the file you created above.

Go back to that OatsStandardDialog.rsc file and find the TextDescription labelTitle section and increase the int _rightPad= to a higher number, this will change the width of the box.

See this link for more info : http://colonialcharter.com/index.php/forum/modding-help/948-ui-box-resize
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 08:54:23 PM
 kid1293, Discrepancy, thank you!

kid1293, I deleted pointlist from that place because I saw in a TownHall Template that it is not necessary if I have no smoke.

Quote from: kid1293 on May 24, 2016, 11:10:18 AM
Toolbar base
{
   StringTable _stringTable = "UI/WildOatsVer2StringTable.rsc";
   SpriteSheet _spriteSheet = "UI/WildOatsVer2SpriteSheet.rsc";
}

Toolbar WildOatsVer2 : "base"

What means this "base"? I will use it if it works, thank you, only I want to understand. It is not used in Apiary.

And I was ready to the problems with model, but I have to see it in game to solve them! So, the problem was in WildOatsVer2.rsc.

PS. "I moved all 1 tile to the..." right to have Location (0,0,0) :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 09:04:14 PM
@tanypredator - Just replace my .fbx with your old and you see
people put wood and stone away from the building.

It's Blender and I have had a lot of trouble with points
Ask RedKetchup and Kralyerg, they tell I have been asking
for months.

Why did you scale to 0.040?

The only scale working for me is 0.010 (with the points at least)

I don't know if Blender has some internal measure and I don't
know how to change it.

I have had other 'sub-models' (remember the store I sent you)
and no problems. It's only points giving me headache.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 09:10:39 PM
"base" had to be there when I built rowhouses.
Probably because I made a new button on main menu.
I put it in as a safety, it does not harm your code.

Test this if you want it simpler:

Quote
ExternalList resource
{
   External _resources
   [
      "WildOatsVer2"

      "Template/OatsGathererShed.rsc"

      "Template/NaturalResourceWildOatsGrass.rsc"      
      "Template/RawMaterialWildOats.rsc"
      "Template/NaturalResourceTree.rsc:spawn"
   ]
}

Toolbar WildOatsVer2
{
   Toolbar _parent = "Game\Toolbar.rsc:food";   
   int _sortPriority = 700;

   Action _action = Tool;      
   ComponentDescription _tool = "Template/OatsGathererShed.rsc";         

   bool _autoHotKey = true;
}

Edit: Checked and it's working. :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 09:26:22 PM
One last :)

I moved the models and points in scale 1.000 (I sent them with the zip-file)
one tile (x = -1.000 and then apply) to the left to make room for the road.
Maybe it should be adjusted.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 09:27:21 PM
Yes, I have tested it just a moment ago  :D Only added   "WildOatsVer2" to my ExternalList and the button appears! The scale is Ok, but yes, people go to some place further to build it, and work symbols appear in a not right place.

But if I change scale to 0.01, wouldn't it become too small? I used 0.04 because I imported apiary.fbx and just scaled it to approximately close scale. And looks like it is working Ok with oats themself, which are 0.04 too.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 09:33:30 PM
Yes, a problem.

But if you model in 1.000 (one square in Blender = one tile in game)
You can maybe keep your models in that scale.
Then you make your points and delete all else and scale points to 0.010
and save. Then you adress that OatsGathererShedPoints.fbx in your
OatsGathererShedPoints.rsc

Edit: I use 0.010 all over to keep it simple...
Edit2: I edit in scale 1.000, I only save in scale 0.010
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 10:07:45 PM
kid1293, you are absolutely right. No matter what is the scale of model - the game scales it to the necessary size. But if its scale is 1, and the scale of Points is 0.01, the building cannot be selected after it is finished. So now I have got it to right size, so I'm going to test its yield and whether the oats would vanish at winter.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 24, 2016, 10:42:44 PM
It gave about 750 oats per 1 worker, that is too much, and the number of oats plants in the forest is also too big. And they don't disappear at winter, I'll have to ask author of "Cold realism" about how he did that. So I'm going to decrease the chanse of re-seeding to a half and to make little changes to model.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 24, 2016, 11:01:54 PM
Great! :)

I'm gone for today, have to take a train.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 25, 2016, 12:11:12 AM
Check the resource file for squash
it's temperature dependent
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 25, 2016, 12:40:10 AM
kid1293, thank you, I have got it to work already - just somhow lost or forgot to make "bool _temperatureDependent = true;". Only little adjustment is left.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 25, 2016, 06:15:20 AM
no matter where is your mesh on your screen, but your points dummy neeeds to be at 0,0,0 and all the other dummies neeed to be relative to that extremly important point position (which is 0 0 0)

3ds is way much simpler when dealing with pointlist and also in 3ds , 1' tile = one tile in game
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 25, 2016, 08:07:36 AM
The Blender 'Export FBX' function is a problem.
(Discussed in Blender forums)

So I guess the scale on the 'sub-points',  build,use,smoke,create...
is part of that problem.

This stops me from experimenting too much,  :(  I know there might be
some problems. I stick with what works.

And the models for Banished don't have to be complex. After all, they are
rather small in-game.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 29, 2016, 09:51:19 AM
May I ask for help again, please? I'm making a mod with flax, flax gatherer and linen weaver. It had compiled normally (only something strange with fence and table, I tried to correct that, but can't check at the moment). The problem is that the gatherer doesn't gather flax. I believe that there must be a problem with limits, that must be "textile", but I couldn't find any building with textile limit to check myself. First (when the gatherer didn't gather flax) the limit referenced to "CropField.rsc:resourceLimit", then I tried to change it (as in my current FlaxGatherer.rsc), but now it doesn't want to compile because "Failed to load resource 'C:\Tany\games\banishedmod\modding\BanishedKit\LinenProduction\bin\Template\FlaxGatherer_labelLimit.crs'".

Can somebody, please, give me an advice on this limits?
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 29, 2016, 10:02:20 AM
I'll have a look this evening.

The short answer is that your gatherer collects FOOD.


This is maybe it.
   ResourceLimit _resourceLimit = Textile;
should be:
   ResourceLimit _resourceLimit = "Textile";


edit: no it wasn't
---

Here's a fault, you don't have a labelLimit paragraph:

RibbonDescription resourceLimit
{
   Alignment _alignment = TopLeft;
   bool vertical = false;
   int _topPad = 4;
   int _cellPad = 8;

   ElementDescription _elements
   [
      "labelLimit",   <-------
      "editLimit",
   ]

   Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
   StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
   String _toolTipText = "TextileLimitTip";
}

Check any resource file for the use of labellimit
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 29, 2016, 10:10:57 AM
Thank you, kid1293! I thought about that, but I think that this professions are more like just labels, because there is almost nothing specified in Profession.rsc. If you are right, than I just have to add a new profession - it must be easy. But I feel that there is a problem with limits. I have set
"HerbalistDescription herbalist
{
   ComponentDescription _naturalResource
   [
      "Template/NaturalResourceFlax.rsc"
   ]
   ResourceLimit _resourceLimit = Textile;
}" (and I don't know, why herbalist, just copied it from Gatherers Shelter!),
but in the game Flax gatherer building showed a food limit.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 29, 2016, 10:13:28 AM
Quote from: kid1293 on May 29, 2016, 10:02:20 AM
Check any resource file for the use of labellimit

Oh, God, that would take ages. I just don't know, where to look. But I'll try. Thank you.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 29, 2016, 10:27:28 AM
Hm, I have the same part -

ElementDescription _elements
   [
      "labelLimit",
      "editLimit",
   ]

in my Linen weaver with no problems (only I haven't checked the work of its limit, but it compiled well). The only difference is that it later references to

   Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
   StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
   String _toolTipText = "ClothesLimitTip";
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 29, 2016, 01:03:15 PM
I inserted this in FlaxGatherer.rsc after the UI section:

QuoteLabelDescription labelLimit
{
   Alignment _alignment = MidLeft;

   Font _font = "Font\FontSmall.rsc";
   int _imageWidth = 20;
   int _imageHeight = 20;
   int _spacing = 4;
   LabelPosition _labelPosition = TextRight;
   Alignment _textAlignment = MidLeft;

   StringTable _stringTable = "Dialog/StringTable.rsc:gameDialogs";
   String _text = "TextileLimit";
   SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
   String _spriteName = "Textile";
}

and this:

QuoteSpinnerDescription editLimit : "Dialog/SharedElements.rsc:spinnerSmall6"
{
   int _increment = 100;
   ElementDescription _border = "Dialog/SharedElements.rsc:flatButtonEnabledBorder";
}

---

I compiles well and all is fine except the label 'Linen Clothes' in the weaver-
so I inserted:
      { String _name = "LinenClothesRequire";         String _text = "Linen Clothes [Flax]"; }
last in your stringtable

Oh, almost forgot - copy resource/Template/ToolMaker.rsc to your Template folder.

All you have to do is clean up the menus.
You see where I commented out two line (  the // ) (in LinenWeaver.rsc)
I gets rid of the winter coat icon

QuoteLabelDescription labelLimit
{
   Alignment _alignment = MidLeft;

   Font _font = "Font\FontSmall.rsc";
   int _imageWidth = 20;
   int _imageHeight = 20;
   int _spacing = 4;
   LabelPosition _labelPosition = TextRight;
   Alignment _textAlignment = MidLeft;

   StringTable _stringTable = "Dialog/StringTable.rsc:gameDialogs";
   String _text = "ClothesLimit";
//   SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
//   String _spriteName = "WinterCoat";
}


Here are the two changed files.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 29, 2016, 01:28:52 PM
you guys are doing good jobs :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 29, 2016, 01:35:57 PM
Keeping the fire 'til you come back. ;)
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 29, 2016, 01:37:41 PM
@tanypredator
While I am at it.
in FlaxGatherer.rsc:

QuoteCheckDescription enableCutterWorkButton : "Dialog/Work.rsc:enableWorkCheck"
{
   ElementDescription _content = "labelCutterWorkUncheck";   
   ElementDescription _check = "labelCutterWorkCheck";   
   int _rightPad = 0;
}

change:
   int _rightPad = 68;

and you get a nice menu.
Title: Re: Some ideas for mods and some questions about making mods
Post by: RedKetchup on May 29, 2016, 05:06:33 PM
Quote from: kid1293 on May 29, 2016, 01:35:57 PM
Keeping the fire 'til you come back. ;)

yeah i restarted lately, trying to put myself in the bath of moding lol
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 29, 2016, 08:40:51 PM
@kid1293, thank you so much! I see my mistakes now. I'll also have to improve few models and to test yield, hope no problems more :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 29, 2016, 09:11:44 PM
It's OK. :)

There are so many calls in the code, it's easy to miss some.
Usually I copy code and rename, but then I compare my code to one
or two similar files just to check.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 29, 2016, 09:19:46 PM
Tested it just a moment ago. Now limits are named right, but the numbers are still for food limit, 5000 by default, and when I change it - the food limit changes. Although there is even no word "food" in the code!  : :-\ Probably it would be better to name it "food" back. I just wanted to use this new textile limits, provided in 1.05 version of game. Or in this case they will eat flax?
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 29, 2016, 09:32:54 PM
No they will not eat flax, it's textile

Or you could make it grain and don't have the edible flag
on it and they will not eat it
.
But then you have to make a special barn with grain flag for storage.
That's how I am doing with my coffee mod.

Don't change the vanilla barn (it does not have grain flag),
there are so many people changing it, so there are always problem.

The food limit comes from FlaxGatherer.rsc -
{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit";
String _insertAt = "userButton2";
DialogControllerConfig _config = "CropField.rsc:resourceLimitConfig";
}


which calls CropField.rsc -

ResourceLimitUIConfig resourceLimitConfig
{
ResourceLimit _resourceLimit = Food;
}


so you can make a small file with only
ResourceLimitUIConfig resourceLimitConfig
{
ResourceLimit _resourceLimit = Textile;
}


and call it. It should do the trick.
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 29, 2016, 09:37:21 PM
Or you can change -

{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit";
String _insertAt = "userButton2";
DialogControllerConfig _config = "resourceLimitConfig";
}

and then write this in the same file (FlaxGatherer.rsc)

ResourceLimitUIConfig resourceLimitConfig
{
ResourceLimit _resourceLimit = Textile;
}


It's cleaner and does the same.
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 29, 2016, 09:47:16 PM
Thank you!!! That works!  :D
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 29, 2016, 09:48:16 PM
 :D
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 30, 2016, 04:38:08 AM
Done: http://worldofbanished.com/index.php?action=downloads;sa=view;down=105
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 30, 2016, 07:38:39 AM
 :)

Now you just have to solve the conflict with WildOats mod.
Both use the tree file to spawn - so you have to choose.

Put them together!  (?)
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 30, 2016, 07:46:35 AM
Quote from: kid1293 on May 30, 2016, 07:38:39 AM
Put them together!  (?)

That is what I'm going to do. And with further mods too - to upload them separately, then as a part of a pack. You gave me an idea - I'll upload the pack (though only of two mods for the moment) as a separate topic, and then update it with new plants.

The plants that I want to add yet are wild roses (rose hips), new type of pines (pine nuts), and, maybe, almond. Ah, and maybe to change herbs, to add some yellow color :)
Title: Re: Some ideas for mods and some questions about making mods
Post by: kid1293 on May 30, 2016, 08:06:36 AM
 :D

Sounds wonderful! I am looking forward to it.

Discrepancy would love to hear this. He likes the forest.
I think you are going to make us a new game!
Title: Re: Some ideas for mods and some questions about making mods
Post by: tanypredator on May 30, 2016, 08:19:20 AM
Thank you!

I love the forest too. Both in life and in game :)