World of Banished

MODS Garage => Tips and Help => Topic started by: angainor88 on July 31, 2017, 02:38:27 PM

Title: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on July 31, 2017, 02:38:27 PM
Hey, so I am new to modding in general, and especially in Banished, but I finally made a house and successfully compiled it (I hope). But when I try to test it out in game, the icon doesn't show up. There's just a tiny button where nothing happens when I click it (picture attached). Any ideas on how to fix it? (I've been using Discrepancy's "Creating a 3d model house in blender and making it available in game" tutorial)

Thanks!
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on July 31, 2017, 03:09:36 PM
make sure you referencing properly your SpriteSheet and StringTable inside your toolbar file at the root of your mod

example:

Toolbar MyHouse
{
Toolbar _parent = "Game\Toolbar.rsc:housing";
int _sortPriority = 802;
StringTable _stringTable = "UI/MyModStringTable.rsc";
SpriteSheet _spriteSheet = "UI/MyModSpriteSheet.rsc";

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

bool _autoHotKey = true;
}



i guess you really have an icon inside UI/Sprite/ folder ? 32x32 pixels

once you will see your icon.... there you will able to tell if really something happening or not if you press your icon. if the icon light up, you should see your model.
if not, maybe too tiny (as big as a fly?), or misplaced like high in the sky, or underground ?
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on July 31, 2017, 05:35:19 PM
Thank you for the help! (unfortunately it didn't fix the problem.)

The little tiny button gives me a wooden house that it then won't let any of the people build (it wouldn't find the points.rsc file in my folder either).

I do have a little 32x32 .png file in the Sprite folder, and I added the lines to the code like what you have.
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on July 31, 2017, 07:37:32 PM
Quote from: angainor88 on July 31, 2017, 05:35:19 PM
Thank you for the help! (unfortunately it didn't fix the problem.)

The little tiny button gives me a wooden house that it then won't let any of the people build (it wouldn't find the points.rsc file in my folder either).

I do have a little 32x32 .png file in the Sprite folder, and I added the lines to the code like what you have.
about your dot:
what is written inside your string table and your spritesheet ??



-------------------------

about pointlists:

you need to make a pointlist.rsc file which will point to a "dummy" or "point" in your fbx which will be the head of a group of "points" or "dummies". the dummy you need to find in your fbx are :

build_001, build_002, build_003 ..... which is used to tell the game : how many builders you need to build the building (if you have 4 build_00x = you will need 4 builders to build this building.
also they are used to set exactly on the map where they need to stand and use the hammer or the saw.

use_001, use_002, use_003  .... which are used to tell the game : where the citizen need to stand for working or use the building, or use the house (drop the food basket for example, or stand to eat food or get warmth)

create_001, create_002, create_003 .... which are used to define the spot where a new resource created will spawn (for example the honey spawns on the ground for the apiary)

all those "dummies" must be "linked" or "grouped" under a dummy called " points" which is placed at 0,0,0 on your blender/3dsmax.


your pointlist.rsc will point to that "master" dummy called points.


i suggest you strongly to go check apiary in the example, and load the apiary.fbx and see things they need to be set in your fbx.
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on July 31, 2017, 07:43:27 PM
Quote from: angainor88 on July 31, 2017, 05:35:19 PM
The little tiny button gives me a wooden house that it then won't let any of the people build (it wouldn't find the points.rsc file in my folder either).

I do have a little 32x32 .png file in the Sprite folder, and I added the lines to the code like what you have.


can you show us ?

also, did you put the lines in your MyModSpriteSheet.rsc that lead to that .png  file ?
did you put the lines in your MyModStringTable.rsc that will set the name and the tooltip of your building ?

in your template of your wooden house, in the "toolbar" paragraph, did you pointed the name of the building and the name of the 32x32 icon in your spritesheet/stringtable ?

go check the template/apiary.rsc example
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on July 31, 2017, 07:57:01 PM
i made you a screenshot on 1 of my building. i used 3dsmax. blender has its own way to make the same thing.
you will see in my .fbx i have alot of green squares, they are my dummies. blender i think makes "plus" shapes like a " + " at the screen.

you can see at top, all my points called use_00x build_00x create_00x .... they all inked to a master one called "points" :)

in your fbx , the toolkit need to find your list of points.
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on July 31, 2017, 08:02:43 PM
here the code of my pointlist.rsc :


PointList resource
{
String _meshName = "Models\Canals\NMT30Canal4xMill.fbx"; // this is the name of my .fbx
String _subObject = "points"; // this is the name of my master dummy points that contain all my use_ create_ build_ points in my .fbx
}



the name of that pointlist.rsc above is set inside your template under the "Interact" paragraph in your template.


InteractDescription interact
{
PointList _pointList = "Models/Canals/NMT30Canal4xMillPoints.rsc"; // this is the name of my pointlist and the name of my folder where i did put that pointslist.rsc
}

Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on August 01, 2017, 02:12:10 PM
Sorry, I've been trying to fix some of the other problems I've had. Unfortunately the Toolsx64 thing keep breaking when I run it now.

I did add all the stuff you said though, so if I can get it to compile again maybe it will work...
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 02, 2017, 05:22:36 AM
make sure all your building material textures are in a 64x 128x 256x 512x or 1024x format. it doesnt accept any strange numbers
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on August 02, 2017, 07:09:23 AM
Hmm I put all my textures into one .png file. I will have to double check the size when I get home.

Thank you for helping me! I will get back to you later!
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 02, 2017, 08:35:39 AM
you need to know that is it difficult to point out what is wrong with your mods since we dont have much info (you dont give us any info). i am not at your computer, and i am not at your keyboard to check your files and folder structure.

the best and most easy way to check is being able to surf through your files and find the problem. i helped alot of people by downloading the code/files and check by myself. And then explain what is wrong.

so if you want me to find the problem, you will need to help me by providing the code in here, or by uploading on a storage place so i can download it and check.
you can then send me the downloading link in personal messenging if you prefer no-one else put the hand on your code/file.


if not :
what you will need to do is put a copy/paste of much of your .rsc files between code brackets [ code ] [ /code ] (without spaces)
- your .bat file.
- the 3 .rsc files at your root of your mod.
- the 4 .rsc files in UI folder.
- the .rsc template file in the Template folder.
- all the .rsc files in the Models folder.
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on August 02, 2017, 03:46:35 PM
Sorry, here is a link to the download (it's on Mediafire, sorry for the ads): http://www.mediafire.com/file/gzsc1w2hyieix1s/DutchCapeCottage.7z


My current guess is I need to make more AO files for build01 and build02, because that looks like where it is crashing? but I am not sure.
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 02, 2017, 05:07:53 PM
thanks

starting to check ...

root : ok
UI folder : ok
template :

right there at begining error :

ToolbarDescription toolbar
{
SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
String _spriteName = "BuildDutchCapeCottage";

StringTable _stringTable = "Dialog/StringTable.rsc:objects";
String _stringName = "DutchCapeCottage";
String _stringNameLwr = "DutchCapeCottageLwr";
String _toolTip = "DutchCapeCottageTip";

String _statusStrings
[
"CreateOk",
"CreateBlocked",
]

int _group = 3;
}



should be:


ToolbarDescription toolbar
{
SpriteSheet _spriteSheet = "UI/DutchCapeCottageSpriteSheet.rsc"; // should be this
String _spriteName = "BuildDutchCapeCottage";

StringTable _stringTable = "UI/DutchCapeCottageStringTable"; // should be this
String _stringName = "DutchCapeCottage";
String _stringNameLwr = "DutchCapeCottageLwr";
String _toolTip = "DutchCapeCottageTip";

String _statusStrings
[
"CreateOk",
"CreateBlocked",
]

int _group = 3;
}




which should fix your icon problem
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 02, 2017, 05:28:27 PM
now i tried to compile and yeah, it crash
even if it talks about your AO when it crashed, it is not necessairly that the problem.
at begining i started i had no idea how to do an AO.png file.....
so i used long time an empty white .png of 64x64 and was working fine !

gonna check your .fbx, i think the problem is more there than anything else...
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 02, 2017, 05:49:28 PM
ok i made 2 screenshots. i use 3dsMax but i think your should still understand...
the way it is made inside your .fbx is not good.

first should not have : lights and camera control your meshes.

under camera.001 i see some mesh03.001 , mesh02.001, mesh01.001.. and when i click them, they point some of the things that should have been part of build01...
and camera i see mesh01, mesh02, mesh03, mesh04, mesh05.. and when i click them, they point some of the things that should have been part of mesh...

you should have only : your points (which seems fine), mesh , build02 and build01. the parts under camera.001 belongs to build01 should be entirely merged into your build01... and the parts under camera belongs to mesh should entirely merged in your mesh

the game doesnt handle sub categories (or sub meshes). each mesh must be "connected" or "merged" into 1 single mesh and not a gathering of parts
i hope you can still understand me (cause english is not my primary language)
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on August 03, 2017, 04:53:27 PM
Ok I have made some changes and, yay! the icon shows up! and it doesn't crash!

Unfortunately, the people still won't build my house. They pick up resources, then instantly put them down again :(

I will work more on it tomorrow. Thank you again for all your help!

(new updated link, if you have time/inclination: http://www.mediafire.com/file/1nfnxevieinyky3/DutchCapeCottage.7z )

And I can understand you fine :)
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 03, 2017, 05:10:01 PM
first, the template is still wrong, you did still put :objects at the stingtable... you dont have a paragraph in your stringtable that is called objects.
so you need to not put :objects at the end of the link


ToolbarDescription toolbar
{
SpriteSheet _spriteSheet = "UI/DutchCapeCottageSpriteSheet.rsc";
String _spriteName = "BuildDutchCapeCottage";

StringTable _stringTable = "UI/DutchCapeCottageStringTable.rsc"; // <===== NO :objects
String _stringName = "DutchCapeCottage";
String _stringNameLwr = "DutchCapeCottageLwr";
String _toolTip = "DutchCapeCottageTip";

String _statusStrings
[
"CreateOk",
"CreateBlocked",
]

int _group = 3;
}



second : the icon.png at the root of your folder cannot be 64x64. the icon.png must be 48x48 not more not less :)
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: embx61 on August 03, 2017, 05:23:18 PM
Looks like build dummies to me which are maybe wrong as they don't deliver the resources.

Blender uses a different system then max with dummies I believe and they need a separate fbx file for the dummies?

Kid probably knows for sure as he uses Blender.

Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 03, 2017, 05:25:55 PM
woah !

did you got this ?

i see a problem of units when you export to .fbx :)

i didnt tested the building process though, but verify your points build_001 ... build_003 they need to be placed to free spot infront of your building.
if you stated :

####
####
##_#
........

the build_00x need to fall where it is free (every ##### it is forbitten to citizens to go walk there (so they cant go build) make sure they are available)
i would say put them at -1.7 y (or better at -2.0 y) (EDIT -1.7 x or better -2.0 x since your mesh are on an angle based on X , not Y)

Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: embx61 on August 03, 2017, 05:31:00 PM
Not sure about that Red.

I have dummies in places which are marked as # as lot of my dummies are inside the buildings and the builders just go there.

I think after the building is finished the # starts kicking in and if the building is demolished the builders can go there again.

He needs to do some scaling too LOL

Remind me of my first building which was almost as big as the map LOLOL
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 03, 2017, 05:43:39 PM
i moved them , and they built it fine :) so right, it is because you put them right where they are not allowed to walk :)

but even if there is a units problem... still i see your house inside 3dsMax as big as 14 tiles per 8 tiles.
your stated 4x4 in your template. or you change the template to match your mesh ... or you scale down your 3d mesh to fit your template :)

and check the units you are exporting to fbx :)
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 03, 2017, 05:47:44 PM
Quote from: embx61 on August 03, 2017, 05:31:00 PM
Not sure about that Red.

I have dummies in places which are marked as # as lot of my dummies are inside the buildings and the builders just go there.

I think after the building is finished the # starts kicking in and if the building is demolished the builders can go there again.

He needs to do some scaling too LOL

Remind me of my first building which was almost as big as the map LOLOL

oh he is learning ^^ he is learning we all passed by that hehe

me too i did it 3 years ago!
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on August 07, 2017, 05:55:41 PM
Heyo, just giving a quick update (busy week). Finally got it to the right scale, just having rendering issues. Might be a problem with blender, so gonna be working on that next.

Thanks for your help :)
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 07, 2017, 06:45:51 PM
Quote from: angainor88 on August 07, 2017, 05:55:41 PM
Heyo, just giving a quick update (busy week). Finally got it to the right scale, just having rendering issues. Might be a problem with blender, so gonna be working on that next.

Thanks for your help :)

that you will learn by experimenting :)
more and more you will do... better you ll get at it :)
and then you ll pick up some nice tricks here and there which will affine your skills :)

try to do simple things first and allow yourself to learn
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: embx61 on August 07, 2017, 07:18:48 PM
I agree with Red.

Just keep experimenting with that house you are currently working on.

It is a learning curve but we all had to go through this process.
Red and me, and I even think all the moddrs active her on WoB did not know anything about modding so we were in the same situation you are currently in.

Even now after a bit over two years modding for Banished there are still things I never attempted and still today I sometimes get frustrated because of the flaws I still have.

But if you get that building you are currently working on in the game and it works as you want it gives a lot of satisfaction and will drive you to do more...... and more.....and more :)
After a little while some things are just like second nature and then you can expand your knowledge and do more complicated things.

And if you ever get stuck just ask questions here on WoB and we will help you with it.

I wish you the best as we can always use new modders.



Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on August 12, 2017, 12:03:14 PM
Hey all!

I am back and fixed all my rendering issues! (I think!)

But the house still shows up extremely shadowed when I place it in the game. Like the shadowed side of the house will be pitch black. I am not sure where the problem is coming from, any ideas?

http://www.mediafire.com/file/pwh4qhkdcnn34rw/DutchCapeCottage.7z

Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: Tom Sawyer on August 12, 2017, 12:31:36 PM
Looks like your AO images are way too dark. You can try to make it brighter in Photoshop or something else.
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: kid1293 on August 12, 2017, 12:58:39 PM
I guess, from my experience, that you haven't made an AO-map for your model.
Sometimes the games has no default AO-map and all walls, roof and everything
is placed in a dot (usually lower left corner)
One way to avoid this is to make a completely white AO texture.

Or, of course, to AO-map the model the right way.
If you are using Blender, Necora wrote how to AO-map a model.
http://worldofbanished.com/index.php?topic=1424.msg28417#msg28417
Don't give up!
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: RedKetchup on August 12, 2017, 01:16:32 PM
yeah you need to fix your AO file, it is not correct.
use a 100% white blank one , or follow the link to the tutorial for learning to make a proper AO file :)
Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: angainor88 on August 18, 2017, 02:52:15 PM
Woo! Here's a picture of the Cottage! (I think I might need to make it a little bigger).

Now to fix the icon!

Title: Re: Made a Mod, Doesn't Show Up (newbie question)
Post by: embx61 on August 18, 2017, 05:01:38 PM
Yes, make it a little bit bigger (About 10 to 15%) and it should be fine.

Keep going and you will get better and better at it. Good job! :)