News:

Welcome to World of Banished!

Main Menu

Some ideas for mods and some questions about making mods

Started by tanypredator, May 09, 2016, 10:20:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RedKetchup

#30
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.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

tanypredator

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?

kid1293

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. :)


tanypredator

Thank you again, kid1293! I'll try and if I get a result, I'll bring it here.

RedKetchup

those 2 the compiler easily finds them in the /resource/folder and need to NOT be provided.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

tanypredator

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.

kid1293

You have moved your listfile to FirePitResources.rsc
but you address Package.rsc in your bat-file

tanypredator

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"

kid1293

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.

tanypredator

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.

kid1293

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.

RedKetchup

#41
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.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

kid1293

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. :)

tanypredator

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.

kid1293

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.  :)