1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

RFC feature editing in World Builder

Discussion in 'Rhye's and Fall - Dawn of Civilization' started by Leoreth, Jan 17, 2016.

  1. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    As some of you might have noticed, merijn has started to work on exposing some RFC features (stability maps, core areas ...) to the world builder. The current ongoing pull request is here.

    This thread is both for testing/discussing that implementation and trying to figure out how it should ultimately look like.
     
  2. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    I'm running into Python errors as soon as I want to edit anything, see attachments if not fixed already.
     

    Attached Files:

  3. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,580
    Location:
    The city of the original vlaai
    Could it be that I named my file which as has the functions MapDrawer.py. So you have 2 MapDrawer.py files if you have this tool installed as well?
    (Then, it was stupid from me to give it the exact same name :blush:)

    In that case, we have to rename my file and it should be fine.

    EDIT: I'm renaming my MapDrawer.py to MapEditorTools.py. I'm fairly sure this should fix the problem.
     
  4. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    General thoughts:
    - I like a UI option to convert your save, but does it really belong in the world builder? Also, I will work on the DLL soon to store the current version in there, so this command cannot be executed more than once. Maybe I can even get the game to update itself automatically.
    - I also like the stability overlay in the main UI, but I think as with SoI it would look better if it used the colored hatched lines (like settlers do, or you're using in the WB) and included the core area
    - It looks like you're using the MapDrawer script to export maps, is that correct? That presents a number of problems. First, the script is not versioned in Git, so it will only work for people who've downloaded it (but we could add it of course). Also, it's not really geared to produce human readable output. In particular, the formatting as it is in the maps files is very important, so things like tabs should be in there as a minimum. Not sure if the CSV module that is backing MapDrawer can support that. Also, you're likely only interested in what you're trying to edit. So export should be an action specific to the civ and type of map you're editing
    - not sure if editing anything other than stability/settler and war maps makes sense right now. CNM isn't in the DLL and likely never will be. And as you've noticed, core areas are still in this hybrid state where sometimes the hardcoded Python values are used, and transitioning out of that will not happen soon. So we should focus on these capabilities and not expose too much else
    - not sure how universal my UI expectation tools are but I would find it more natural if I could click on a tile that I would want to edit and then select or input the new value, instead of selecting the new value first and then "painting" with it
    - I think it could work to only have one universal map mode (no extra one for core and CNM). Simply color according to stability (although an extra color for unsettleable for the AI is nice and should be kept, overriding the normal orange/red), and always display city name and settler value below the coordinate display
     
  5. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    Oh, I see, that explains a lot. Disregard my point on that above then. Will try it again with the right file tomorrow, it's getting late :)
     
  6. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,580
    Location:
    The city of the original vlaai
    The button doesn't need to be in the WB. I thought was that it such a button is useful, because not everyone is familiar with the python console. (Although it's easy and the instructions are clear) It was that I just found an unused button and gave it this function. Maybe a key combination like ctrl+L would work as well.

    I like it better too. By now, I only incorporated it. We can always make it better. ;)

    I created my own file which has all functions in it regarding changing the map, as well as exporting. I gave the same name. I think this caused some confusion. I've already renamed the file. (This probably caused the errors) Right now, MapEditorTools.py does the exporting and all other functional stuff.

    For now, I just output similar to your MapDrawer tool. I'm aware this isn't optimal. I just wanted it to work in the first place. Optimizing it to produce useful output is something I didn't work on yet.

    The CNM thing isn't really supposed to be an editor. It is just a viewer, like the old tool I created. The same can be said for the spawn zones.

    The ploteditor has that option. The idea with the paint tool is that you can quickly set the settlervalue of a whole bunch of tiles.

    You mean the core map is put over the stability map? That would work, but I still need a button do know if you are changing the settlervalue or the core area. But the overlay can be combined into 1 for sure.
     
  7. Lokki242

    Lokki242 That One Guy

    Joined:
    Jan 22, 2011
    Messages:
    1,000
    Gender:
    Male
    Location:
    Vancouver, Canada
    I know this is off topic, but the topic got me thinking.

    Coming out of semi-retirement on the forum to just say how much I appreciate the hard work both of you constantly do and how you never fail to impress me so, so much.

    I have hundreds upon hundreds of hours in Civ 4. It's my go to relaxing game, something I play when I need to just breathe and feel good.

    Without your outstanding work, this surely wouldn't be the case.

    Thanks, you guys. :)
     
  8. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    Yeah, actually at first I thought you had put it in the main menu (that also has a recreate map button in the case of random maps). Maybe you can figure out how to put it there.

    Sure, as I said, I'm more than willing to merge an initial implementation and then iterate on it. I'm just trying to formulate my vision of what it could look like in the end so we don't diverge too much in what we're working at.

    Yeah, again that is just a thought on what the final state should look like.

    Okay, but I would be careful in what the interface communicates. If there is a specific "mode" for it in the WB, it suggests that you can also edit something in it.

    Okay, looks like I haven't discovered that yet.

    Yeah, basically do the stability map, then override with the core map and the "never settled by the AI" color. That should give a good overview of the state of a specific civ. And we also don't lose anything by always displaying settler value and city name. On the contrary, the absence of a specific mode to display those further communicates that there is nothing to edit here.

    And is there really a point in allowing editing the core area for now?
     
  9. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,580
    Location:
    The city of the original vlaai
    That is indeed a more suitable place for that button. I never touched the main menu buttons, so I don't know if I will many. With a bit of bad luck it requires DLL changes.

    I didn't really think about interface communication. (Out of curiousity, is this something you learn when you study for software developer?) But with the changes you suggested, it will be changed anyway.

    I want to give the player the opportunity to customize there game. Some people like to customize their game by editing the map. (Better resource arrangement for example) In a similar way, they can modify cores if they prefer it.
    From a modders perspective, it may not be really necessary indeed. (for now)


    Another thing, I changed the PlayerInfoScreen, so you can easily modify civ specific modifiers. (Maybe you already discovered this. I added this feature only recently and it might be overshadowed by the other features)
     
  10. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    Yeah, I have no idea how to do it myself. Although BUG adds an option there, and that is all Python.

    I don't think it ever really was taught at uni, but I was involved in a bunch of projects with their own frontend. You usually quickly run into the problem that users expect something you didn't intend from the way you present the UI to them.

    True, I meant it more from a perspective of what actually will be changed. Since the implementation is currently inconsistently relying sometimes on the DLL and sometimes on the Python data, offering the ability to edit cores will cause inconsistency between the two, something that the naive WB user will not even be aware of. I don't think it's a good idea to let a user do that.

    Oh right, I've seen that and wanted to remark on it, that's really cool.
     
  11. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,580
    Location:
    The city of the original vlaai
    My idea was a like:
    "In this particular game, I want tile X to be core.
    I click on the tile and it becomes core.
    I play on"

    The player doesn't bother if it changes something in the python or the DLL. It just want the tile to be core or not.

    Only if you want to edit the core tiles permanently instead of just 1 game, it becomes an issue. But I don't think the regular player will do this.
     
  12. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    I know, but that's not what happens. The CvPlot instance isn't used in every case where the core is relevant. Every time the list of all tiles in core is queried it is done so directly via Python constants, which cannot be edited right now. That is what I meant with inconsistency. You're right that the user doesn't care about Python or DLL but they do care that when they make a change it applies everywhere. Currently it wouldn't.
     
  13. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,580
    Location:
    The city of the original vlaai
    I see.

    I've change the stability overview to a "settlerlike" overview. I currently have 3 possible color variants. (Personally, I like the 2nd option the most. It's the clearest of them all. I could ofcourse combine the options)

    Basic colors (I use now)

    Spoiler :


    Basic colors with cyan instead of dark green for core (idea from SoI, so the core is more distinct from historical area)

    Spoiler :


    Tooltip colors. (Matches the tooltip colors in the bottom left)

    Spoiler :
     

    Attached Files:

  14. Shadow Warlord

    Shadow Warlord Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    272
    Dunno if this is the place for this, but...

    Will this world builder also include a city name overview like RFC Europe? That was a very convenient feature just to see how the names were plotted, and to see what each civ had the name as.
     
  15. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    Where are the names displayed in RFCE?
     
  16. DC123456789

    DC123456789 Chieftain

    Joined:
    Feb 24, 2012
    Messages:
    3,060
    Location:
    Canada
    I think the 2nd version (SoI-inspired) looks the best.
     
  17. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    Oh right, forgot to reply to that. I agree that the SoI configuration looks best.
     
  18. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    I looked at the next pull request and I like basically everything about it. There's still a bug with the overlay I mentioned on Github.

    Also a little interface improvement: I noticed that the revert/export dialog only appears when selecting core or settlervalue. Could you make it context sensitive to whether core or settlervalue is selected? That would save two buttons and you could actually label the remaining ones simply export and revert.
     
  19. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,580
    Location:
    The city of the original vlaai
    Is there any need for a Warmap editor? It would work very similar to the settlervalue editor.
     
  20. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,993
    Gender:
    Male
    Location:
    Leblanc
    Definitely! I haven't paid much attention to them but if editing became easier that might actually be something worthy of a revision.
     

Share This Page