Author Topic: Menu issues in mod  (Read 520 times)

0 Members and 1 Guest are viewing this topic.

Offline Nikki

  • Newb
  • *
  • Posts: 5
Menu issues in mod
« on: November 19, 2018, 10:17:07 AM »
I've been trying to make a mod for Banished. From what I can tell I have things the menus right and compared to the examples, but they're not showing up in game. I'm not sure what I have wrong, or how to find what it is.

I'm not sure what I else I should put here. I'm new to modding Banished, and the forums.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9915
  • Country: ca
Re: Menu issues in mod
« Reply #1 on: November 19, 2018, 11:59:46 AM »
I've been trying to make a mod for Banished. From what I can tell I have things the menus right and compared to the examples, but they're not showing up in game. I'm not sure what I have wrong, or how to find what it is.

I'm not sure what I else I should put here. I'm new to modding Banished, and the forums.

If you want to help you, you need to give some infos. we arent soothsayers or telepathics. you need to type, copypaste, provide everything you can so we can "see" whats going on and where are your errors.


EDIT: I strikethrough some text, i didnt meant to offence, sorry.
« Last Edit: November 23, 2018, 08:12:43 AM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline Nikki

  • Newb
  • *
  • Posts: 5
Re: Menu issues in mod
« Reply #2 on: November 19, 2018, 04:44:46 PM »
No one said you are "soothsayers or telepathics", I don't know what I need to copy&paste or I would have. Unless I know what to put here I can't put anything useful here. If this is how you "help" people I'm not sure I want help. I will either figure it out eventually or give up, but if this is how people act I won't share any mods for this like I don't share any mods I've made for other games. It doesn't matter to me how much work I put into a mod, it's not worth sharing only to get crap for replies.

Offline Glenn

  • Trader
  • ****
  • Posts: 113
  • Country: au
Re: Menu issues in mod
« Reply #3 on: November 19, 2018, 06:30:10 PM »
Nikki,

Red isn't giving you crap, he simply said that you need to share/show what you have done so far so the others can guide you in the right direction.

Help them so they in turn can help you.

Everyone is very nice here, so please do not over react.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9915
  • Country: ca
Re: Menu issues in mod
« Reply #4 on: November 19, 2018, 06:55:51 PM »
Nikki,

Red isn't giving you crap, he simply said that you need to share/show what you have done so far so the others can guide you in the right direction.

Help them so they in turn can help you.

Everyone is very nice here, so please do not over react.

sorry @Nikki   :'(
i didnt meant to give you any crap.

you ask for help. we here always help people. surf a bit those this subforum.
we need to see your code so we can point out your error(s). start with your root resource and toolbar files, package.rsc and your .bat
if we need more, we gonna ask more details.

Again, Nikki. i am very very sorry.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline Gatherer

  • Banished Expert
  • *****
  • Posts: 1058
  • Country: si
Re: Menu issues in mod
« Reply #5 on: November 20, 2018, 08:17:22 AM »
 ::)
Fiat panis

Offline Nikki

  • Newb
  • *
  • Posts: 5
Re: Menu issues in mod
« Reply #6 on: November 22, 2018, 07:32:13 AM »
I don't check forums daily, and all the extra things to fill in don't help me want to reply here. The cmd file is more complicated than it needs to be, but for how I use things it's easier for me. The other projects I have that don't have menus work fine.

I don't like sharing source to anything. I've had far too much work stolen, and had other people take credit for it. Then because they had the source, I'm the one that gets accused of theft. No surprise that when I stop sharing new source, the "original" stops being updated.

This is no where near finished. I'm trying to get the first part finished before moving on.

Offline Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 948
  • Country: is
Re: Menu issues in mod
« Reply #7 on: November 22, 2018, 09:12:32 AM »
I don't use the community toolbar, so others can say more about this. But the way of adding new items to the game is actually different to your source. If you look at the apiary example from Luke, there is an ApiaryResources.rsc calling Apiary.rsc:apiary and the modkit is quite sensitive to this naming relative to the mod name and so on. I would try to make it close to this example. In your case, making a NM_Storage.rsc for the toolbar items and calling them separately via NM_StorageResources.rsc. Just a thought but maybe it helps.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9915
  • Country: ca
Re: Menu issues in mod
« Reply #8 on: November 23, 2018, 08:05:25 AM »
first, i dont know why you are not using the .bat files system and use those .cmd. Is it because you dont use windows 7 or 10 ?

i looked inside all those .cmd and nowhere it is written all the infos a real build.bat file should have. Probably it is playing a big part about your trouble, or NOT. No idea.

sedundo, your package.rsc:list

there is tons of things there that should not be. in fact, absolutely all the lines you did put in your :list paragraph, none of them should be there. so you can delete all those lines, all of them.

along with your package.rsc, at the root, you should have a file named : NMStorage.rsc which will contain the toolbar placement of your items you want to add

NMStorage.rsc
Code: [Select]
Toolbar NMStorageBarn
{
Toolbar _parent = "Game/NMtoolbar.rsc:NMstorage";
int _sortPriority = 10;
Action _action = Tool;
ComponentDescription _tool = "Template/NMStorageBarn.rsc";
bool _autoHotKey = true;
}

Toolbar NMStorageBarnWood
{
Toolbar _parent = "Game/NMtoolbar.rsc:NMstorage";
int _sortPriority = 20;
Action _action = Tool;
ComponentDescription _tool = "Template/NMStorageBarnWood.rsc";
bool _autoHotKey = true;
}

Toolbar NMStorageBarnFirewood
{
Toolbar _parent = "Game/NMtoolbar.rsc:NMstorage";
int _sortPriority = 30;
Action _action = Tool;
ComponentDescription _tool = "Template/NMStorageBarnFirewood.rsc";
bool _autoHotKey = true;
}

Toolbar NMStorageBarnStone
{
Toolbar _parent = "Game/NMtoolbar.rsc:NMstorage";
int _sortPriority = 40;
Action _action = Tool;
ComponentDescription _tool = "Template/NMStorageBarnStone.rsc";
bool _autoHotKey = true;
}

Toolbar NMStorageBarnIron
{
Toolbar _parent = "Game/NMtoolbar.rsc:NMstorage";
int _sortPriority = 50;
Action _action = Tool;
ComponentDescription _tool = "Template/NMStorageBarnIron.rsc";
bool _autoHotKey = true;
}

Toolbar NMStorageBarnCoal
{
Toolbar _parent = "Game/NMtoolbar.rsc:NMstorage";
int _sortPriority = 60;
Action _action = Tool;
ComponentDescription _tool = "Template/NMStorageBarnCoal.rsc";
bool _autoHotKey = true;
}

those are your anchors for your items you want to add to the game, anchored on your Game/NMtoolbar.rsc:NMstorage toolbar which is also anchored in CommonToolbar.rsc


then your new Package.rsc should look like that:

Code: [Select]
PackageFile NMStorage
{
String _name = "Nikki's Mods Storage";
String _author = "Nikki";
String _description = "Nikki's Storage v0.0.1a";
String _icon = "icon.png";
String _preview = "preview.png";
int _userVersion = 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
[
"NMStorage.rsc:NMStorageBarn",
"NMStorage.rsc:NMStorageBarnWood",
"NMStorage.rsc:NMStorageBarnFirewood",
"NMStorage.rsc:NMStorageBarnStone",
"NMStorage.rsc:NMStorageBarnIron",
"NMStorage.rsc:NMStorageBarnIronCoal",
]
}


Again, i have no idea if your .cmd works, i suggest to use the real build.bat. do your Package.rsc modifications. create the new .rsc file at the root of your mod next to the Package.rsc and called: NMStorage.rsc
(i also deleted your _ underscore in PackageFile NM_Storage : the game hate special caracters because they have a certain functions sometimes, let the game use them when needed, you, abstain to use those.)

your build.bat should look like that :
Code: [Select]
bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../NMStorage /pathdat ../NMStorage/bin
bin\x64\Tools-x64.exe /mod Package.rsc:NMStorage /pathres ../NMStorage /pathdat ../NMStorage/bin

again i delete your undescore of your folder name from NM_Storage to NMStorage. Let us know how it goes and if it has been resolve.
-RedK
« Last Edit: November 23, 2018, 08:17:14 AM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline Glenn

  • Trader
  • ****
  • Posts: 113
  • Country: au
Re: Menu issues in mod
« Reply #9 on: November 23, 2018, 04:03:25 PM »
Nikki,

I fully understand your worry about people stealing the work you have already done, many times I have seen mods on steam with multiple creators.

I have never seen such horrible behaviour here, and if it ever happened I am sure the culprit would be banned.

While I am not a modder (perhaps one day) those that do mod help one another to the best of their ability.

By sharing files more experienced eyes can see what needs to be done when you are having problems.

Indeed a new coding discovery by one person (such as recreating the water in the game) is shared so the other modders can make new creations.

Resource file sharing allows for multiple modders to have their creations work together

By doing so glass, bricks or a grain etc made by one modder can be used in another modders house or mill.

Variety if the life blood of any game, and the material made by the wonderful modders that we have can only be complimented by anything that you may create.

All my best

Glenn

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9915
  • Country: ca
Re: Menu issues in mod
« Reply #10 on: November 24, 2018, 05:42:41 AM »
sharing to folder is a very last minute option when we cannot find the problem at all for days...
and sharing is always better in PM to a direct person instead make it open where everyone can download.

> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline Nikki

  • Newb
  • *
  • Posts: 5
Re: Menu issues in mod
« Reply #11 on: November 24, 2018, 07:26:41 PM »
I have multiple mod projects, but I'm only working on two of them for banished right now. The other one that doesn't have toolbars works correctly. I use the almost the same command files for both. I will try what has been said.

Offline Nikki

  • Newb
  • *
  • Posts: 5
Re: Menu issues in mod
« Reply #12 on: November 28, 2018, 08:43:11 AM »
I didn't have time to add this before, but I ask that if you don't know much about bat/cmd files that you don't tell me mine are wrong. I said they were more complicated than needed, but they do indeed work.

If you make the script print the command instead of running it you get
Code: [Select]
bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../mods/NM_Storage/source /pathdat ../mods/NM_Storage/bin
bin\x64\Tools-x64.exe /mod Package.rsc:NM_Storage /pathres ../mods/NM_Storage/source /pathdat ../mods/NM_Storage/bin

If you tried to use the scripts as is without configuring them for your environment, then no they wouldn't work. Any tool needs to know where something is and more often than not relative paths don't work right.

I tried commands like red says I need to use and they did not work. I can tell from looking at the commands that /build tells it what to build, /pathres tells it where it is, and /pathdat is you want the complied code to be. With the exception of package.rsc I know you can store source and bin anywhere as long as the tool can read/write them, and the data in the source location is correct. I can't say about package.rsc because I have not tried that, and I don't want to.

I know the scripts I use work, and the overall layout works because the other mods I use that don't change the menus build correctly, and work as expected in game. There is not much documentation to how some things need to be for the game, and the examples are lacking in usefulness. I know some of you will now assume I don't know what I'm doing anywhere, and if that's the case it just shows me that there is no help here.

Also the things red said to change, changed nothing in game.

Offline galensgranny

  • Architect
  • *****
  • Posts: 728
  • Country: us
Re: Menu issues in mod
« Reply #13 on: November 28, 2018, 12:37:44 PM »
Nikki, the people answering you are just people like you, players of the game who decided to make mods for it.  They had to learn how to make mods basically on their own.  They are not official representatives of the game.  The maker of the game, Luke, never made any detailed instructions and does not offer help for making mods.  So any replies trying to help you are from people who did make mods that worked taking time out of their lives to try help another person trying to make a mod work.  If what they say does not solve your problem, that is unfortunate, but they do deserve thanks for trying to help.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9915
  • Country: ca
Re: Menu issues in mod
« Reply #14 on: November 28, 2018, 01:21:37 PM »
I didn't have time to add this before, but I ask that if you don't know much about bat/cmd files that you don't tell me mine are wrong. I said they were more complicated than needed, but they do indeed work.

If you make the script print the command instead of running it you get
Code: [Select]
bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../mods/NM_Storage/source /pathdat ../mods/NM_Storage/bin
bin\x64\Tools-x64.exe /mod Package.rsc:NM_Storage /pathres ../mods/NM_Storage/source /pathdat ../mods/NM_Storage/bin

If you tried to use the scripts as is without configuring them for your environment, then no they wouldn't work. Any tool needs to know where something is and more often than not relative paths don't work right.

I tried commands like red says I need to use and they did not work. I can tell from looking at the commands that /build tells it what to build, /pathres tells it where it is, and /pathdat is you want the complied code to be. With the exception of package.rsc I know you can store source and bin anywhere as long as the tool can read/write them, and the data in the source location is correct. I can't say about package.rsc because I have not tried that, and I don't want to.

I know the scripts I use work, and the overall layout works because the other mods I use that don't change the menus build correctly, and work as expected in game. There is not much documentation to how some things need to be for the game, and the examples are lacking in usefulness. I know some of you will now assume I don't know what I'm doing anywhere, and if that's the case it just shows me that there is no help here.

Also the things red said to change, changed nothing in game.


about the .bat and their path... it depends where you put your .bat. if you put the .bat inside your mod folder you need to add ../ at begining of each line. if your .bat is placed inside a /mods/NMStorage/ folder then you need to add 2 times the ../../ at begining of each line.


or

Code: [Select]
..\bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../mods/NM_Storage/source /pathdat ../mods/NM_Storage/bin
..\bin\x64\Tools-x64.exe /mod Package.rsc:NM_Storage /pathres ../mods/NM_Storage/source /pathdat ../mods/NM_Storage/bin


or

Code: [Select]
..\..\bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../mods/NM_Storage/source /pathdat ../mods/NM_Storage/bin
..\..\bin\x64\Tools-x64.exe /mod Package.rsc:NM_Storage /pathres ../mods/NM_Storage/source /pathdat ../mods/NM_Storage/bin

personally my .bats are never inside the mod. if you go deeper, you need to add commands to comeback less deeper.

EDIT: about your line: why there is a /source/ folder ?? and also if you use NM_Storage or NMStorage without _ , make sure it matches your syntax.
and i forsee more problems with that /source/ folder... wont the /bin/ and /build/ folder created in the /source/ folder ? dont need to change also the pathdat.. too ?
« Last Edit: November 28, 2018, 01:50:11 PM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .