Improved WorldBuilder

I think i fixed the two problems now. But i want to clean the code before i post an update.
My next plan is to rewrite the module to make it easier to plugin new functionality in the future. The file was a mess before and now it is an even greater mess with all my changes :crazyeye:

Sounds great!
How did you eventually fix the visuality problem of the signs?
 
I added an additionally entry in the dropdown box, as i proposed. if you try to switch between players directly the empty value is selected automatically and you have to choose again. I think this is the most practical solution.
 
Here is the update.
- visible maps are editable again
- city names are displayed completly when switching players (but you have to pick the player twice)
- civilization names in the generated python files use the civs short description
- versionized the zip file
 
@Michael Vick: please could you give some feedback why you decided to not use this worldbuilder to edit the city names. Somewhere you said it was buggy, did you really discover any bugs, or is it just inconvenience?
I don't edit the city names myself, so i'm not familiar with how you work. But i still thought it would be an improvement over the old way.

Thanks in advance
 
I might have done something wrong, but it happened more than once where I would change a few things, look at a different map, then go back to the previous map, and the changes would be undone. I would sometimes save each map while I was on it, then come back to it, and it would still be undone. The changes seemed to stick sometimes but others not, maybe it is that I have to exit the map in a certain way for the changes to be saved?

Another thing is that when I go to another tab other than civ iv such as a screenshot, the world builder settings will change from whatever I'm editing, say, Charlemagne's City Name Map, to Justinian's Unit Placement (as always, I know that's normal). The map on the screen however, sometimes continues to show the Charlemagne labels, but if I go back to the city name map editing, it gives me both the French and Byzantine landmarks on the same page. Then when I leave that screen, it updates, and next time I try to open Justinian's city name maps, it is Byzantine mixed with French.

I've found out ways to get around this, such as switching to Charlemagne in the unit placement THEN going to city name maps, and that gives the appropriate map without any errors, but if I ever accidentally do this in the wrong order, I have to start over. I also figured out that saving the changes works most usually when you switch from one city name map to the other, THEN go to another part of world builder, regardless of when you actually save the the map through the menu.

Also, even if different names get saved on land tiles, when I remove names from a water tile, they always come back, it seems that city names can only be changed and not removed? Please point out my error if I'm doing something totally wrong.


This editor works, essentially, and I managed to edit all the provinces, settler/war maps without issue but I would personally rather do extensive changes on city name maps such as those that are necessary with the new Iberia in a way that is less "risky" (that might just be my fault, this feature is still extremely useful). If I need another map for reference I just pull up a screenshot I make or something.
 
Thanks for your response. What you say sounds reasonable to me.

I see that you need to switch windows once in a while. Its annoying that the worldbuilder resets to the "edit unit mode". Thats a general problem of the worldbuilder. Maybe i come up with an idea for this when i rework the worldbuilder on a whole.

The general problem with the city names - if i understand you right - is, that a change to a single tile is not instantly saved. At a certain point all changes are saved together and it is not clear when this happens, and sometimes it does not happen at all, or other things (like the window switching problem) mess it up.

I have already an idea how to fix this, but i want to ask 3Miro before, if he's willing to change the EventManger to make things easier. That would also solve the problem that you cannot remove city names from tiles at the moment.
 
I just finished adding a new visualization feature to the SVN. Now you can hold Shift and Hover over tiles to see the Core areas for each Civilization (it is a bit tricky for the Ottomans and Byzantines, but it works). You can also set it in Python to show the Normal areas. This would be great for the references, where we can make actual screenshots of the Core/Flip zones for each Civ.

I also added some mechanics for the Settlers and Wars maps, but those don't work very well yet. I will keep working.

You can check RFCEBalance.py at the very end of setBalanceParameters for the functions that you can actually call from within the WorldBuilder. It may be useful to incorporate this in your code, that is, if you can.
 
I just finished adding a new visualization feature to the SVN. Now you can hold Shift and Hover over tiles to see the Core areas for each Civilization (it is a bit tricky for the Ottomans and Byzantines, but it works). You can also set it in Python to show the Normal areas. This would be great for the references, where we can make actual screenshots of the Core/Flip zones for each Civ.

I also added some mechanics for the Settlers and Wars maps, but those don't work very well yet. I will keep working.

You can check RFCEBalance.py at the very end of setBalanceParameters for the functions that you can actually call from within the WorldBuilder. It may be useful to incorporate this in your code, that is, if you can.

This sounds great!
I was still messing with the core and normal areas for the civs, and they are a pain in the ass. At least if you want them to be exact
Will check this feature out right now, it should make it much straightforward :goodjob:
 
I get an error message on startup, and Civ IV crashes to desktop.
Or rather won't even switch into fullscreen mode:

"Initialize Renderer failed. Check DirectX Installation, Latest Graphics Drivers and Graphics Settings Parameters:
- width = 1024
- height = 768
- flags = 0xc
- hwnd = 0x780916
- adaptrid = 0
- deciveid = 1
Error: Creation failed: Could not match desired fullscreen mode"

I'm not sure it's only a matter on my end, or is it somehow connected that you use a different OS, but the mod and Civ IV was running perfectly with the previous SVN version
 
Nevermind, it's definitely a matter on my end :confused:
 
The code is not fundamentally different from the code for visualizing the provinces. Did you change Assets\XML\Interface colors definitions, I am using several of those.

Do you get any Python errors, it is possible for Python to break this. I will take a look at this tonight, unfortunately I am at work right now and there is not much I can do.

You can try to set the "what to plot" parameter in RFCEBalance to -1, although that should simply disable the coloring code.
 
Nevermind, it's definitely a matter on my end :confused:

I finally managed to solve it
Idiotic Windows Update (the latest, I updated this morning) messed up everything regarding my video card - at least how it handles somewhat older games
Turns out this "Initialize Renderer failed" bug was also a huge problem 5-6 years ago, when Civ IV came out.
Seemingly it had (has?) issues with handling different DirectX versions for a few video card types.

Had to uninstall these latest Microsoft Updates, then reinstall earlier drivers for my VC and earlier DirectX, but now everything works fine
Hopefully they will fix these issues for the next Windows Update, it was clearly a fault of Microsoft :mischief:
But seriusly, I advice against updating those latest windows "fixs" for anyone who has a Radeon videocard
 
I just finished adding a new visualization feature to the SVN. Now you can hold Shift and Hover over tiles to see the Core areas for each Civilization (it is a bit tricky for the Ottomans and Byzantines, but it works). You can also set it in Python to show the Normal areas. This would be great for the references, where we can make actual screenshots of the Core/Flip zones for each Civ.

I also added some mechanics for the Settlers and Wars maps, but those don't work very well yet. I will keep working.

You can check RFCEBalance.py at the very end of setBalanceParameters for the functions that you can actually call from within the WorldBuilder. It may be useful to incorporate this in your code, that is, if you can.

I tried it out and all maps worked well. :)
The different colors in the war and settler maps share the same border. It's hard to tell where one color ends end the next begins. It would be better to use a new AreaBorderLayer for each color. And it would be good if there was some kind of legend that would tell in which order the colors go from highest to lowest.

However may i ask the question why you did it in C++? I did the same with python. Did you ever look at my worldbuilder? It's almost the same. All the visualization code is separated in RFCEMapUtil.py. You can call it from anywhere too. It's not tied to the worldbuilder.
If your code shall be changed in the future it's hard to do so, because there are only a few people who know how to edit the dll.
I think if possible visualization should be done in python. Its easier to maintain and performance isn't that relevant here.
As far as i remember core and normal areas are available in python too. So they shouldn't be a problem.
 
Do you like the visualization? The Settlers maps don't work very well, but the rest should be fine.

Yeah, the core and normal areas look nice, with these visualisations it will be much easier to set those areas initially, or even later to balance them
Didn't use the other 2 yet, Caliom's WB tool is already great for settler and war maps
Anyway, again some great modding updates here :goodjob:
 
However may i ask the question why you did it in C++? I did the same with python. Did you ever look at my worldbuilder? It's almost the same. All the visualization code is separated in RFCEMapUtil.py. You can call it from anywhere too. It's not tied to the worldbuilder.
If your code shall be changed in the future it's hard to do so, because there are only a few people who know how to edit the dll.
I think if possible visualization should be done in python. Its easier to maintain and performance isn't that relevant here.
As far as i remember core and normal areas are available in python too. So they shouldn't be a problem.

Actually it would be very nice if these could be set from the WB too, like your settler and war maps
Visualisation is just the first step IMO, and to be honest core and normal areas are not very much needed for normal play, rather for modding
 
Actually it would be very nice if these could be set from the WB too, like your settler and war maps

Yeah, that would be cool. If those maps were organized in a file like RFCEMaps.py this wouldn't be a problem. At the moment they are burried somewhere in Consts.py and in a different format (only rectangles).
I also raised the question a few weeks ago if normal and core areas are needed at all? Would it be so much worse to use the provinces for spawn and flip zones?
It would make modding alot easier.
 
Yeah, that would be cool. If those maps were organized in a file like RFCEMaps.py this wouldn't be a problem. At the moment they are burried somewhere in Consts.py and in a different format (only rectangles).
I also raised the question a few weeks ago if normal and core areas are needed at all? Would it be so much worse to use the provinces for spawn and flip zones?
It would make modding alot easier.

Yeah, it would make modding much easier, but provinces are not enough in many cases
We just can't set the province borders in a way that it would work well for all the civs IMO
Maybe I'm just too obsessed with a "perfect" map, but it won't be good enough for me that I'm sure of

So I'm definitely with keeping the core and normal areas
But it would be probably nice if could organize those too in the RFCEmaps.py like the other maps
 
I tried it out and all maps worked well. :)
The different colors in the war and settler maps share the same border. It's hard to tell where one color ends end the next begins. It would be better to use a new AreaBorderLayer for each color. And it would be good if there was some kind of legend that would tell in which order the colors go from highest to lowest.
I can't figure out how to do it. I will keep looking.

However may i ask the question why you did it in C++? I did the same with python. Did you ever look at my worldbuilder? It's almost the same. All the visualization code is separated in RFCEMapUtil.py. You can call it from anywhere too. It's not tied to the worldbuilder.
If your code shall be changed in the future it's hard to do so, because there are only a few people who know how to edit the dll.
I think if possible visualization should be done in python. Its easier to maintain and performance isn't that relevant here.
As far as i remember core and normal areas are available in python too. So they shouldn't be a problem.

Because I know C++ and I didn't know how to do this in Python. Also, provinces used to be restricted to C++ only, now they can be accessed via Python too. Thus all that I did was to copy/paste the code and tie to provinces.

I have not looked at your WB, I don't do much with the map. Is your WB even included in the main SVN, if it is working well, then we should include it.

If we can include those coloring in your WB in Python, then we should use Python of course.
 
Is your WB even included in the main SVN, if it is working well, then we should include it.
If we can include those coloring in your WB in Python, then we should use Python of course.

It's not in the svn yet, feel free to add it ;)
If things go well i will post an update soon. I think i fixed the problem with the city names. I will also try to inlcude visualization of normal and core areas as well. If everything works you can add it to the svn.

I have not looked at your WB, I don't do much with the map.
No problem, i know that you have other things to do.
 
Back
Top Bottom