Improved WorldBuilder

Ok, i can do that. But i do not see yet what makes this way so much better. Is it that lists take up more space in ram? On the other hand, if the arrays are only there to initialize the coresponding structures in c++, isn't there a way to unload them afterewards. I mean to remove them from ram.

I think the part with C++ is already in use. ;)
 
Ok, i can do that. But i do not see yet what makes this way so much better. Is it that lists take up more space in ram? On the other hand, if the arrays are only there to initialize the coresponding structures in c++, isn't there a way to unload them afterewards. I mean to remove them from ram.

I think the part with C++ is already in use. ;)

Lists use more resources to work, not just RAM but also CPU. In terms of loading time, arrays would be better.

I am not sure if the maps are also referenced somewhere Python (other than RFCEBalance.py). Map sweep-loops in scripting language like Python take a lot of time, this counts double if we have to use lists as opposed to arrays.

The C++ structure is an array and while individual entries can be edited, the size should stay the same.

Is it too much work to do the list-array conversion for the editor only?
 
Is it too much work to do the list-array conversion for the editor only?
No, that's no problem.
I just thought why not use the structure that is already there and just change their type. But i see the drawbacks now. I will do it the way you sugest for the next version.
 
Next wednesday i have more time, then i could upload a stable version of the recent progress. It has some nice other improvements too.

Bump ;)
No pressure or anything, I'm just surios how is this coming along
 
Ok, here is it. Didn't have time to test it much, so as always make a backup of your stuff.

Using it should be very intuitive. Editing the Maps is like painting now. All values are represented by colors. Right click on a tile will pick up that color, left click will paint it. You can also select the colors from a dropdown box. Brushsizes work too.
If you wanna save the RFCERMaps, just save the whole worldbuilder file. The RFCEMaps are then written to a second file in the same directory.

All controls are in the standard worldbuilder menu bar in the top right corner. First select the "Reveal Tile mode". Then choose "War Maps", "Settler Maps" or "Provinces" from the dropdown box that appears below. For war and settler maps there is another dropdown box that lets you choose the leader. The last dropdownbox let you choose the province or war and settler values. The provinces/values can also be selected by right clicking on a tile. See screenshots.


would love to see some feedback.
 

Attachments

  • EditingProvinces.jpg
    EditingProvinces.jpg
    181.7 KB · Views: 118
  • EditingSettlerMaps.jpg
    EditingSettlerMaps.jpg
    180.5 KB · Views: 155
Ok, here is it. Didn't have time to test it much, so as always make a backup of your stuff.

Using it should be very intuitive. Editing the Maps is like painting now. All values are represented by colors. Right click on a tile will pick up that color, left click will paint it. You can also select the colors from a dropdown box. Brushsizes work too.
If you wanna save the RFCERMaps, just save the whole worldbuilder file. The RFCEMaps are then written to a second file in the same directory.

would love to see some feddback.

Thanks, will check it out tonight :goodjob:
 
How do you edit the provinces with the worldbuilder? I'm relatively new at this.
Are you a bit familiar with python and how the warmaps, settlermaps, city name maps and provinces in RFCE work?
This is no final version and i'm still waiting on AbsintheReds feedback if it works the way it is intended. I don't wanna get blamed if someone messes things up :crazyeye:
 
I don't wanna get blamed if someone messes things up :crazyeye:

Don't worry, you won't :)
Will get to you with that feedback soon
 
Are you a bit familiar with python and how the warmaps, settlermaps, city name maps and provinces in RFCE work?
This is no final version and i'm still waiting on AbsintheReds feedback if it works the way it is intended. I don't wanna get blamed if someone messes things up :crazyeye:

I don't know anything about python or modding.
 
Hey Caliom!
Sry I didn't get back to you with proper feedback
Actually I couldn't even run it properly when I donwloaded a few weeks ago, and later I was dragged away to other things
This was one of the python errors which came up:
attachment.php


I wasn't able to edit the settler and war maps at all (the tiles didn't change)
Only the city name maps, and even there were some errors when saving
 

Attachments

  • Civ4ScreenShot0036.JPG
    Civ4ScreenShot0036.JPG
    119.8 KB · Views: 406
Thanks for your reply. I'm sorry that it didn't work at all.

The problem was the conversion from tuples to lists. I thought i had found a nice way to do that by simple calling "myList = list(RFCEMaps.tSettlersMaps)". But it actually only converted the outer tuple to a list, leaving the nested tuples as they were.
The reason why it seemed to work for me was, that i had each Map twice in my RFCEMaps.py, once as tuple and once as list, the later overwritting the first. :sad:

I fixed it, so you can try once more :)

Edit: look in the newer posts for an updated version
 
I had quite a few test runs, and it already works great!
It's perfectly useable, you did a great job
Here are a few small observations, if you don't mind:

- The Visible Maps are not editable. This may have been the case before, and it's not needed that much, I just wanted to mention it.

- Currently the World Builder only shows the already born civs Visible Maps, all the other ones are full darkness
EDIT: Now that I think of it, probably this is the normal RFC behavior. Maybe it's possible to add the to-be-born civs' visible map (the one they will get on spawn) from turn 1?

- City name maps. I saw you already mentioned the problem on the last page. When switching between civs, the plots which have city name signs on both maps will disappear. So, when the game shows a full french map, and you swith to burgundy, the WB will show the burgundian map as a full blank one.
This is a display thing though, so there is no real bug. It won't overwrite any of the files.
But this means it's much harder to fine-tune the maps, so a good chunk of the comfort with using this tool is gone
I'm not totally sure, but probably you can solve this this way: I would add a full blank map (as dummy map) into the python file. And whenever you swith to another civ's city name map, you do it in two steps. First to the dummy map, and then automatically to the real map. Would be a little slower of course, but syncronizing the maps would be so much easier

- And another small thing when you save the file, and get the map.py file:
If I'm correct, the civ names are saved as the current dynamic civ names (with the unborn civs as their civilopedia name: The Swedish for example)
These are just comments of course, but could you change it to something constant?
It's somewhat annoying when comparing the different files
 
Currently the World Builder only shows the already born civs Visible Maps, all the other ones are full darkness
EDIT: Now that I think of it, probably this is the normal RFC behavior. Maybe it's possible to add the to-be-born civs' visible map (the one they will get on spawn) from turn 1?
I asked myself the same question. Saving the visibility maps in the worldbuilder file would be easier to maintain than the rectangles in the python files, but i assume there is a reason why this way isn't used. I can imagine that it has something to do with autoplay.

The Visible Maps are not editable. This may have been the case before, and it's not needed that much, I just wanted to mention it.
It did work before. I will look into it

City name maps. I saw you already mentioned the problem on the last page. When switching between civs, the plots which have city name signs on both maps will disappear. So, when the game shows a full french map, and you swith to burgundy, the WB will show the burgundian map as a full blank one.
This is a display thing though, so there is no real bug. It won't overwrite any of the files.
But this means it's much harder to fine-tune the maps, so a good chunk of the comfort with using this tool is gone
I'm not totally sure, but probably you can solve this this way: I would add a full blank map (as dummy map) into the python file. And whenever you swith to another civ's city name map, you do it in two steps. First to the dummy map, and then automatically to the real map. Would be a little slower of course, but syncronizing the maps would be so much easier
That is an interesting observation. I didn't notice that exactly those cities disappear that are also on the previous map. I thought it was random. If this is realy the case than your suggestion might work :) I will look into it.


And another small thing when you save the file, and get the map.py file:
If I'm correct, the civ names are saved as the current dynamic civ names (with the unborn civs as their civilopedia name: The Swedish for example)
These are just comments of course, but could you change it to something constant?
It's somewhat annoying when comparing the different files
I had something constant before, but it wasn't the civilization name. I think it was the corresponding adjective, i'm not sure. If you have a good suggestion i will use it.
 
I asked myself the same question. Saving the visibility maps in the worldbuilder file would be easier to maintain than the rectangles in the python files, but i assume there is a reason why this way isn't used. I can imagine that it has something to do with autoplay.

Originally (in RFC mods) you can only check the alive civs' visibility maps
All the other ones are "gaps" on the list
I have no idea why was it coded this way (by Rhye, I assume), but I also don't see any setbacks if they are editable

It did work before. I will look into it

Thanks. Checked again and they previously worked with simle left click reveal - right click unreveal
Currently you list all the civs under the visibility maps, even the unborn ones with full dark visibility
But none of the civs are editable


That is an interesting observation. I didn't notice that exactly those cities disappear that are also on the previous map. I thought it was random. If this is realy the case than your suggestion might work :) I will look into it.

I'm fairly sure this is the case with the disappearing names
Hope it's not hard to implement my suggestion

I had something constant before, but it wasn't the civilization name. I think it was the corresponding adjective, i'm not sure. If you have a good suggestion i will use it.

Actually I don't really care what's the name, but I do prefer that they are constant
Probably the best would be TXT_KEY_CIV_XYZ_DESC, or TXT_KEY_CIV_XYZ_SHORT_DESC
 
Hey Caliom, did you find an easy solution to that city name maps overlapping issue?
Or my idea didn't work?
 
My guess is that during one screen update i can either remove or add a landmark but not both. I have tried a few things but nothing worked :(
It seems that such an update does not happen until the control is returned to the screen. That means that i need two actions from the user to change the city names. I'm not sure wich is the friendliest way to do that. Maybe i add an empty value in the dropdownbox of the civilizations. Then you have to selecet this entry first to remove all labels and then select the civ you want. Or i add a button to remove all labels. But i like to stick to inputs that are already available. If i introduce a new button, then i have to claim a unique number for the utton events in the EventManager. That needs to be synchronized with other modules and i dont want that.
Hope i find some time to play around soon.
 
My guess is that during one screen update i can either remove or add a landmark but not both. I have tried a few things but nothing worked :(

I was afraid of that :/
Then I have no ideas either how to solve this

It seems that such an update does not happen until the control is returned to the screen. That means that i need two actions from the user to change the city names. I'm not sure wich is the friendliest way to do that. Maybe i add an empty value in the dropdownbox of the civilizations. Then you have to selecet this entry first to remove all labels and then select the civ you want. Or i add a button to remove all labels. But i like to stick to inputs that are already available. If i introduce a new button, then i have to claim a unique number for the utton events in the EventManager. That needs to be synchronized with other modules and i dont want that.
Hope i find some time to play around soon.

No need to mess things up for a button
If it has to be two steps, an empty value in the top of dropdownbox is more than enough
 
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:
 
Back
Top Bottom