World of Banished

MODS Garage => Mod Talk => Topic started by: Baxitus on November 09, 2018, 03:37:58 AM

Title: Is it possible to create this mod?
Post by: Baxitus on November 09, 2018, 03:37:58 AM
Hello,

First, I apologize for my bad English. I translated the text with the google translator and reworked the translation.

I would like to create a mod for Banished. I'm a software developer but have never created mods for any game. Before I start to learn how to create mods, I wanted to ask first if the project is technically feasible.

I want to create a mod for Storage. The buildings should have new options that can be set individually for each building. This should be implemented for Storage Barn and Stock Pile.

- Selected materials may not be stored
- Selected materials are requested
- Selected materials are outsourced. In that case, ordinary workers are allowed to store the material, but warehouse workers will then move it to another warehouse as quickly as possible.

I also want to introduce a new working class. The warehouse worker. The Storage Barn and Stock Pile are shared by these warehouse workers. 5 workers can be assigned to each building. These workers are only responsible for moving materials between storages. Like vendors, they have a wheelbarrow and can carry the same amount of material.

Is the Banished API able to implement this project?
Title: Re: Is it possible to create this mod?
Post by: RedKetchup on November 09, 2018, 09:16:56 AM
no. you say you are a software developper so you are a programmer. making mods is not programming it is modding.
when you are programming, you are inventing new things, new functions, conditions, and etcetera.

moddling you cannot invent anyting new, you are only allowed to use existant functions and the functions are very strict. you cannot add something to functions that is not expecting to find. or it will be ignored, or will crash. you cannot use the whole functions and mix them with other things that the game arent expecting.

as i said, the game is already programmed, and need to do things that the game is expecting.
which wont help neither, the API is not conventional, it is his homemade api.
Title: Re: Is it possible to create this mod?
Post by: brads3 on November 09, 2018, 09:48:16 AM
your english is great. no problems understanding it. what you describe is 2 parts. a wharehouse that a player sets the inventory to store items can be done.it works similar to the trading post as for the screenjust doesn't send goods to boats.the wharehouses only send goods back when a player lowers the amount stored. now can this inventory just list food or materials and not everything,a modder would have to answere. my understanding is the inventory can nnopt be broken apart to do it. these workers will take the items back to a barn.we have not found a way to tell them to take it to a market or another wharehouse specifically.

        the bannies can not take the items out of the wharehouse themselves. players have to manually tell it how much to store.so if food was stored in the wharehousethe bannies can starve since they can not use it.the only way to get that food back is to lower the amount and wait for the assigned worker to move it to a barn or market. in your case to move between 2 wharehouses,the platyer would lower the inventory to wh "A" and increase it to wh "B".this will in theory move it.i believe the worker might take it to a barn and the worker for wh "B" collect it from there.since it has to go thru a barn,the bannies could steal the items if they get to them before the other worker. i think you could do a pile the same way except the the modder might have to set the pile size. don't think it would be a stretchable pile like we have now.

        if the plan is for this system to work so you can move something from 1 side of the map thru wharehouses across the map and then the items be used,it would not work very well. the problem is players have to manually control each wharehouse. however,many times a new modder finds a way to do what hasn't been done.since you are a programmer maybe you can unravel a mystery. there is the case of the "SUPER VENDOR". i did a post on this guy:      http://worldofbanished.com/index.php?topic=2086.msg42587#msg42587

       my theory is LUKE coded specials into the game. in order to trigger this special, several conditions must be met.if you do everything a certain way perfectly, then the super vendor shows up.it is a mystery because a few players have seen it but nobody has seen him twice. since we can't see inside all the game program and coding, there is no way for any of us to know how or why to control it. new modders have unlocked mysteries before and opened the game to more possabilities. we are glad to have you try and grateful too.
Title: Re: Is it possible to create this mod?
Post by: tangent on November 16, 2018, 01:46:51 AM
hi Baxitus!

I'm in the same boat as you: Javascript/Ruby developer that's digging into modding.

We have access to some model/class definitions, so standard OOP applies there. I haven't found a way to define new functions though (yet...), but I also haven't been looking.

We could potentially create an extension library that loads with these tables, but that'd be a sloppy monkey patch at best.
Title: Re: Is it possible to create this mod?
Post by: RedKetchup on November 16, 2018, 04:06:57 AM
hehe if you succeed that .... building animations would be great :) oh and the ability to target resource files instead of flags :)
Title: Re: Is it possible to create this mod?
Post by: tangent on November 16, 2018, 05:13:50 AM
the 2nd request would be MUCH easier than the 1st for me... but the first would still be hard because I don't know what Luke's conventions are
Title: Re: Is it possible to create this mod?
Post by: theonlywanderer on November 23, 2018, 06:46:05 AM
Colonial Charter has a distribution barn.    It's a regular barn unless you assign a worker who will then move that inventory to the next nearest storage barn.    It's a tricky barn to use.   I believe it's purpose is for more remote outposts to get their goods to a closer barn near the markets so vendors won't have to travel so far.    If you put two of them to close together without another storage barn closer, they will end up swapping inventory between each other.