Modding problems/question

Post your mods and custom content here

Modding problems/question

Postby York » Mon Sep 10, 2012 3:24 pm

Currently I have just completed a mod that allows players to change the terrain (for example turning stone into grass). It works well but im running into a problem.

When you install the mod, it gives you the option to rightclick a tile, lets say stone, and turn that tile into dirt, this requires a pile of mud to do, however if the player has no mud from mining or digging, it lets you know in the events window with an error, at that point the blue outline on the tile in question remains and cant be removed, not even with a cancel order, this effectively makes that tile broken and cant be used at all (you cant even till/untill it)
(Edit: there is a workaround fix, placing a tile (eg wood block) on the broken tile will remove the order and 'reset' it, not perfect but it works)

Im guessing at this point that CANCELORDER is hardcoded or bugged?

I have 2 options and was wondering what people thought?

To give you a more complete overview of the mod in its current state:
You can turn grass, sand, gravel, stone, jungle and snow into a dirt tile which requires 1 mud
You can then turn dirt into grass (requires a bush), sand (pile of sand), jungle (jungle bush) or snow (snowpile)

Option 1: Release the mod 'as is' and add a warning that you must have the resources available (with details of work around fix)
Option 2: Remove the item prerequisite and release the mod that way, it would only take time to change a tile (which feels abit like cheating to me)
York
 
Posts: 29
Joined: Thu Sep 06, 2012 12:25 pm

Re: Modding problems/question

Postby Spyre2000 » Mon Sep 10, 2012 3:39 pm

I'd say release the mod as is. I was under the impression given most of the comments and my limited experience with the the XML thus far that it was not possible to change the terrain types.

Given that I can't really recommend any fixes as I don't know how your mod is handling things, and your likely to get the same response from some of the more experienced modders since this appear to be a first. But release it as is and perhaps someone can see the code and figure out how to fix it.

As for a potential work around can you make it so you can change items to terrain? Say build a mud wall and then change it to dirt, that way the mud requirement is still there.
Spyre2000
 
Posts: 182
Joined: Sat Sep 01, 2012 10:06 pm

Re: Modding problems/question

Postby York » Mon Sep 10, 2012 3:52 pm

You can, it basically uses how till and untill works but instead of changing to a tilled tile, it turns it into a terrain tile, there is even a <changeTerrain> entry. I just added a part in where you have to use an item first. I would probably have removed the item prerequisites but when I saw you could effectively reset it by just placing a block on top of the broken tile I think I would prefer to keep them, it has the added benefit of requiring existing items from your map, for example you wouldn't be able to plant snow unless your map already had snow on it. Also if you go ahead and wipe out all the jungle trees, preventing any new jungle bushes from spawning, you lose the ability to plant jungle too, which I like the idea of, keeps true to the game imo.

Ill release it and see how its received.

Thanks for your input
York
 
Posts: 29
Joined: Thu Sep 06, 2012 12:25 pm

Re: Modding problems/question

Postby Spyre2000 » Mon Sep 10, 2012 4:58 pm

Why are you using move source?

Code: Select all
<move useSource="true">rmsand</move>


Why not follow the template most time construction uses with the pick command.

Code: Select all
<pick>rmsand</pick>


Not sure this is the source of the issue but just wondering why you did it that way.

As for the bug it might have something to do with a similar bug I noticed happen a lot to me and farming. I mark out a huge section of land to plant wheat in but don't have enough seeds on hand. So only part of the field gets planted and even after a long time with plenty of wheat on hand the rest of the field does not get planted. I have to cancel and redo it.

Granted in that case cancel order does work but I have had times where items or tiles ended up with that blue box over them and never got done. Either in mining/item placement/etc. I had plenty of villagers,some of which were idle, and lots of resources. But the item construction, or whatever task, never got done even months later.

It looks like you have it tied directly to the right-click menu. Though since it is similar to the way till works would it be possible to make it select a large area like Till does?
Spyre2000
 
Posts: 182
Joined: Sat Sep 01, 2012 10:06 pm

Re: Modding problems/question

Postby York » Mon Sep 10, 2012 5:05 pm

I actually tried that first but it wouldn't work, the villagers wouldnt move to the item.

Ill look into how the larger selection works on till'ing, see if i can get it working.

Edit: To be able to do the multiple selection, I would need to add menus to the tilling option on the bottom ui bar and have that as an additional way to convert tiles, at this point I would rather wait until they add support for images in the ui.

Edit 2: Added a menu, you can use multiple selections :)
York
 
Posts: 29
Joined: Thu Sep 06, 2012 12:25 pm


Return to Modding

Who is online

Users browsing this forum: No registered users and 5 guests