World of Banished

MODS Garage => Tips and Help => Topic started by: quadgamer on July 02, 2017, 08:52:11 PM

Title: ModKit not producing results
Post by: quadgamer on July 02, 2017, 08:52:11 PM
I tried to make a simple Plains mod (it's really gonna be Valleys with less mountains). I followed the thorough, simple directions from this post  http://worldofbanished.com/index.php?topic=959.0

When I started the game, "Plains" didn't show in the list. I checked and rechecked all the files to make sure the spelling was correct and matched. Yes, I used Application-x64-profile.exe and I'm running 1.0.7.

Is the modkit buggy? Is that post old and not the way to do it? Can someone please help. Thanks.
Title: Re: ModKit not producing results
Post by: brads3 on July 02, 2017, 08:59:21 PM
not familar with that mod. do you have any other mods loaded? when you click mods from the game screen did you enable the mod?you will want this mod closest to the top above any other start mod that changes the start menu.
Title: Re: ModKit not producing results
Post by: brads3 on July 02, 2017, 09:00:53 PM
once you enable the mod and the game reloads,you do want to exit the game and fully reload it also.
Title: Re: ModKit not producing results
Post by: RedKetchup on July 03, 2017, 05:35:26 AM
in your MyModResource.rsc file at the root of your mod you need to call:


ExternalList resource
{
External _resources
[
"Game/Terrain/TerrainList.rsc" //a copy of the original file copied in you mod folder and modified to add your Plains.rsc.
"Game/Terrain/Plains.rsc", //is the new terrain file you created and you decided the parameters to be more plain, less mountain. Both need to be called here.
]
}


Game/Terrain/TerrainList.rsc :
ExternalList resource
{
External _resources
[
"Game/Terrain/Plains.rsc", // you need to call your new plain map here too and add it to the menu choice.
"Game/Terrain/Valleys.rsc",
"Game/Terrain/Mountains.rsc",
]
}


Game/Terrain/Plains.rsc :

TerrainGenerator resource
{
StringTable _stringTable = "Dialog/MyModStringTable.rsc:terrainType"; // your stringtable with the name of the file you decided, MyMod is just an example.
String _text = "Plains";
bool _exposed = true;

// materials
WeakMaterialInstance _terrainMaterial = "Terrain/Terrain.rsc";
WeakMaterialInstance _riverMaterial = "Terrain/River.rsc";
WeakMaterialInstance _lakeMaterial = "Terrain/Lake.rsc";

// size of the map
Feature _features
[
// ------ small ---------
{
......


you also need to respect the folder integrity. recreate a Game folder, a Terrain folder inside the Game folder. and if you prefer a UI folder, then change the link of stringtable to UI folder  and not Dialog folder in your Plains.rsc.
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 10:54:44 AM
Wow, thanks for the replies.
I did enable the mod and restart the game.
@RedKetchup 1st, luv your mods. I don't know if you checked the link in my post, it may be outdated. I noticed it's missing
ExternalList resource
{
External _resources
[
"Game/Terrain/TerrainList.rsc" //a copy of the original file copied in you mod folder and modified to add your Plains.rsc.
[color=red][i][b]"Game/Terrain/Plains.rsc"[/b][/i][/color], //is the new terrain file you created and you decided the parameters to be more plain, less mountain. Both need to be called here.
]
}

Maybe that was the problem?

I do have the Game and Terrain folders, but the tutorial says to do it this way: Banished\modkit\MyMods\Plains\Game\Terrain. Is that up to date?

Thanks for your help.
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 11:19:44 AM
Quote from: quadgamer on July 06, 2017, 10:54:44 AM
Wow, thanks for the replies.
I did enable the mod and restart the game.
@RedKetchup 1st, luv your mods. I don't know if you checked the link in my post, it may be outdated. I noticed it's missing
ExternalList resource
{
External _resources
[
"Game/Terrain/TerrainList.rsc" //a copy of the original file copied in you mod folder and modified to add your Plains.rsc.
[color=red][i][b]"Game/Terrain/Plains.rsc"[/b][/i][/color], //is the new terrain file you created and you decided the parameters to be more plain, less mountain. Both need to be called here.
]
}

Maybe that was the problem?

I do have the Game and Terrain folders, but the tutorial says to do it this way: Banished\modkit\MyMods\Plains\Game\Terrain. Is that up to date?

Thanks for your help.

if "Banished\modkit\MyMods\Plains\" is your mod you are working on
Title: Re: ModKit not producing results
Post by: embx61 on July 06, 2017, 11:30:43 AM
It should work.

Indeed the Banished\modkit\MyMods\Plains was just my example folders.

I seem to only I missed the extra "Game/Terrain/Plains.rsc.

As the Plains.rsc is called in the TerrainList.rsc I was thinking it was not needed.

Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 11:48:28 AM
For some reason I can't quote. But, @RedKetchup: Something is wrong because it's compiling. In Banished\modkit\bin\WinData there's a file plains.pkm. Everything is spelled correctly. But, when I open the game thru Application-x64-profile.exe or Application-x32-profile.exe it doesn't show.

I tried this about a year ago and had the same problem. I want an xtra large map with 3-5 streams, 2, maybe 3, lakes and only a few mountains. I can't find any so I thought I'd make it. It should be easy.
// ------ xtra large ---------
{
int _mapSize = 640;

// number of flat areas
int _flatAreaCount = 700;

// size of flat areas
int _minFlatAreaSize = 20;
int _maxFlatAreaSize = 30;

// number of areas to avoid
int _avoidAreaCount = 32;

// size of avoidance areas
int _minAvoidSize = 20;
int _maxAvoidSize = 30;

// how many close nodes to connect to
int _flatAreaConnections = 5;

// rivers
int _streamCount = 5;

// erosion
int _erosion = 32000000;

// number of lakes
int _minLakeCount = 2;
int _maxLakeCount = 3;

// lake size
int _minLakeSize = 30;
int _maxLakeSize = 60;

// number of parts per lake
int _lakePartCount = 80;

// part sizes
int _minLakePartSize = 6;
int _maxLakePartSize = 12;
}

*Forgot to say I added the xtra large. It's not the only code in the file.

I copied the Valleys.rsc, changed it to Plains and added "xtra large". I even tried it without it. It still didn't work. I don't know what could be wrong.
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 11:51:37 AM
My folder structure: Banished\modkit\MyMods\Plains\Game\Terrain. Inside Terrain are the 2 files, Plains.rsc and Terrainlist.rsc.
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 01:08:35 PM
put what you have in a .zip and post here, will fix it

not seeing what you made and where are your errors since i dont see your files. you dont give much infos ^^
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 02:34:24 PM
@RedKetchup That's so cool of you. Thank you so much. Sorry it took so long. It wouldn't upload. Kept getting stuck at 5%.



edited by ketchup
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 03:04:10 PM
woah why it is so big ??? did you gave me all your modkit ?
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 03:15:56 PM
your plain is working perfectly, thats your xtra large size that doesnt work
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 03:17:14 PM
oh man. lol sry. was too excited.
https://www.dropbox.com/s/j9dbbhbf29me8s2/Plains.zip?dl=0 (https://www.dropbox.com/s/j9dbbhbf29me8s2/Plains.zip?dl=0)
~5kb better, huh?
thanks again.
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 03:18:30 PM
oh. huh? did you open it in the modkit or did you add the mod to the game?
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 03:35:46 PM
Quote from: quadgamer on July 06, 2017, 03:18:30 PM
oh. huh? did you open it in the modkit or did you add the mod to the game?


i made the .pkm , moved the .pkm to Banished/WinData folder and i launched the REAL steam game

i am checking how to add another new terrain size ( a 4th one cause small medium large count for 3)
Title: Re: ModKit not producing results
Post by: brads3 on July 06, 2017, 03:58:20 PM
just to give yas a heads up. be careful of going too large on the map. there were many attempts with errors and glitches. CC huge is the largest that i know that does work. i do thibnk the attempts were long ago and now there might be more understandings of the codes. it would be nice to see a gigantic map that does work.not saying don't attempt it,but to be careful and realize this maybe one of those game limits.
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 04:20:10 PM
i still didnt figured out how we can add a 4th size.

there is some mention in the string table ...


StringTable terrainSize
{
Entry _strings
[
{ String _name = "TerrainSize0"; String _text = "Small"; }
{ String _name = "TerrainSize1"; String _text = "Medium"; }
{ String _name = "TerrainSize2"; String _text = "Large"; }
]
}


i added another line

{ String _name = "TerrainSize3"; String _text = "Xtra Large"; }


but i am still trying to figure out how the game define the array of  number of TerrainSize from 3 to 4

i thought at some point /Dialog/MapParams.rsc would do it cause it calls the StringTable terrainSize but ... nothing seems happening :(
surely something somewhere... or it is Hardcoded and hidden in the data.pkg
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 04:21:25 PM
probably what you ll have to do ... is in your plains, delete the "small one" and let only the medium/large/Xlarge ones
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 04:31:56 PM
i see also a Dialog/NewGame.rsc which seems similar to MapParams.rsc....
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 04:48:53 PM
Quote from: RedKetchup on July 06, 2017, 04:31:56 PM
i see also a Dialog/NewGame.rsc which seems similar to MapParams.rsc....

doesnt lead anywhere neither :(

so as i said :
Quote from: RedKetchup on July 06, 2017, 04:21:25 PM
probably what you ll have to do ... is in your plains, delete the "small one" and let only the medium/large/Xlarge ones


go with that
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 05:08:23 PM
@RedKetchup Seriously, thank you for all your help & esp your time.
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 05:17:27 PM
GOT IT !!!!!!!!!!!!!!!!!!!   ;D


but i noticed there will be a valley xlarge and mountain xlarge. since they arent added, the game will hang forever in the map generation (doing nothing cause he doesnt find the xlarge mountain and xlarge valley) so you should better to make those too !!! ^^


;D
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 05:21:09 PM
You are brilliant! That's awesome. Ok, I'll make them as well.

-I just posted on BlackLiquidSoftware asking for help. I better take it down.
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 05:21:22 PM
you just have to download the fixed "MyMod" .zip

here the screenshot
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 05:22:49 PM
So cool!
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 05:26:51 PM
And you fixed it?! Who's better than you! Much appreciation.
(I didn't expect so much help. Really. Thanks.)
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 05:30:50 PM
Quote from: quadgamer on July 06, 2017, 05:26:51 PM
And you fixed it?! Who's better than you! Much appreciation.
(I didn't expect so much help. Really. Thanks.)

here on WOB we always try to help as much as we can :)
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 05:40:18 PM
modkit\resource\Game\Terrain there are Valleys.rsc, Mountains.rsc and TerrainList.rsc
Should I add Plains.rsc there too?
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 05:48:22 PM
Quote from: quadgamer on July 06, 2017, 05:40:18 PM
modkit\resource\Game\Terrain there are Valleys.rsc, Mountains.rsc and TerrainList.rsc
Should I add Plains.rsc there too?

no
you do the opposite you put a copy of mountain and valley inside your mymods/plains/game/terrain

and you add the 4th one of each at the end of those

and you call those in your plainsresources.rsc

you never work in your resource folder, they are your original copies. never edit those neither.
Title: Re: ModKit not producing results
Post by: quadgamer on July 06, 2017, 05:58:55 PM
Quote from: RedKetchup on July 06, 2017, 05:48:22 PM

no
you do the opposite you put a copy of mountain and valley inside your mymods/plains/game/terrain

and you add the 4th one of each at the end of those

and you call those in your plainsresources.rsc

you never work in your resource folder, they are your original copies. never edit those neither.

So PlainsResources.rsc doesn't need "Game/Terrain/Valleys.rsc" "Game/Terrain/Mountains.rsc"?

ExternalList resource
{
External _resources
[
"Dialog/NewGame.rsc",
"Game/Terrain/TerrainList.rsc" //a copy of the original file copied in you mod folder and modified to add your Plains.rsc.
"Game/Terrain/Plains.rsc", //is the new terrain file you created and you decided the parameters to be more plain, less mountain. Both need to be called here.
]
}


-I copied and added the xtra large to Valleys.rsc and Mountains.rsc. I had to, I didn't keep the originals.

Thanks.

(Looking at the post, I realize why it doesn't need them.)
Title: Re: ModKit not producing results
Post by: RedKetchup on July 06, 2017, 10:26:41 PM
yes your plainsRessources.rsc file need those


ExternalList resource
{
External _resources
[
"Dialog/NewGame.rsc",
"Game/Terrain/TerrainList.rsc"
"Game/Terrain/Plains.rsc",
"Game/Terrain/Valley.rsc",
"Game/Terrain/Mountain.rsc",
]
}


thats what i said here :
Quoteand you call those in your plainsresources.rsc

you talked about "modkit\resource\Game\Terrain there are Valleys.rsc, Mountains.rsc and TerrainList.rsc" <= your resources folder with the original copies of all the files...

Quote from: quadgamer on July 06, 2017, 05:40:18 PM
modkit\resource\Game\Terrain there are Valleys.rsc, Mountains.rsc and TerrainList.rsc
Should I add Plains.rsc there too?

what you asked was a very different thing . and to that , i said no
Title: Re: ModKit not producing results
Post by: quadgamer on July 07, 2017, 03:29:57 PM
Quote from: RedKetchup on July 06, 2017, 10:26:41 PM
yes your plainsRessources.rsc file need those


ExternalList resource
{
External _resources
[
"Dialog/NewGame.rsc",
"Game/Terrain/TerrainList.rsc"
"Game/Terrain/Plains.rsc",
"Game/Terrain/Valley.rsc",
"Game/Terrain/Mountain.rsc",
]
}


thats what i said here :
Quoteand you call those in your plainsresources.rsc

I thought so. I read it too fast and didn't realize. That was the anticipation. Well, it works. I've been fiddling with the numbers to get it the way I imagined. I did forget about seeds. Still, it is different than Valleys and the maps in CC. I can't seem to get a lot of streams. I'm guessing that has to do with the seed because in "int streamCount =" I got up to 12 and didn't see much difference. Other than that, I'm happy. Thanks so much for all your help.
Title: Re: ModKit not producing results
Post by: RedKetchup on July 07, 2017, 03:46:59 PM
sweet i am glad you got it working :)