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

MapView 2.0 - Civilization 4 Editor

Discussion in 'Civ4 - Utility Programs' started by Gr3yHound, Jan 5, 2009.

  1. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    Don't really know. But i doubt Mapview will help a lot. One thing that will happen is that some BTS depending things will not be saved when you save it as a vanilla map. So it's going to be a nice start. Some keywords from BTS will be removed and stuff but there's no guarantee that the map will run on ffh instantly.
     
  2. AnimaVilis

    AnimaVilis Chieftain

    Joined:
    Aug 26, 2005
    Messages:
    7
    Location:
    Toronto
    It was asked about earlier, but can we still not set the width of the map through Pic2Map?
    Sucks to be limited in this way for such a brilliant plugin
     
  3. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    On it! :)
    You guys really seem to like this thing.
     
  4. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    Pic2Map is a little bit more awesome now. You can now chose how big the created map will be. But needs a little until i can release it. I broke some stuff i need to get back on the road first.

    I currently think about ways to help you improve the result.
    Instead of tweaking the algorythm i'm thinking about a plugin which would go like:
    Change all "Terrain_Type_A" fields to "Terrain_Type_B" in current selection.

    My current changelog looks like this:
    2.0.10
    - Removed Copy Paste, Selection, Deselection etc. (It's a plugin now)
    - Added CopyPasteEtc. Plugin witch will now overtake what the main app did
    - The "New Map" Dialog finally shows the buttons by default
    - The "New Map" Dialog has now default values "100x100"
    - Changed Kernel to be a singleton class
    - Renderer now uses VBOs if available, should increase render performance quite a bit (50% to 100% faster)
    - Added Script Plugin .. Simple python interface for now
    - Exposed some basic API Classes to Python
    - Started working on a dynamic Pic2Map Version, fixed resolution sucks
    - Improved Pic2Map to allow the User to enter the desired map dimensions
    - City Names can now be shown in View
     
  5. 99wattr89

    99wattr89 Warlord

    Joined:
    Dec 3, 2007
    Messages:
    205
    How do I place/remove start locations?
     
  6. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    That's something i haven't touched yet. Good point you have there. I always thought i should implement that.

    To answer your question in one sentence. You can't atm. I'll try to implement this today.
     
  7. 99wattr89

    99wattr89 Warlord

    Joined:
    Dec 3, 2007
    Messages:
    205
    Oh, cool, thanks. xD

    So, I guess you also can't edit starting units yet?
     
  8. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    What do you exacltly mean by starting units? Like a nation that is spiritual and whatnot has a specific unit at start? No you can't do that, that's mod stuff.

    What you can do with Mapview is more like this.
    When creating a scenario you do actually model a state of the map at a certain time. You just deliver a state.

    You can say,
    it's 4000BC and there are teams A B C D E, and they currently have cities A B C D, and Units A B C D at place X etc. and the nations have access to the Techs A B C D etc.
     
  9. 99wattr89

    99wattr89 Warlord

    Joined:
    Dec 3, 2007
    Messages:
    205
    Well, what I meant was preventing the game giving a free settler if you put cities in place already. But like you say, that fall under the realm of mods.
     
  10. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    As said, scenarios deliver a "current state". You would basicly enter a game, that was already created with the state delivered by this particular "*.worldbuildersave".
     
  11. 99wattr89

    99wattr89 Warlord

    Joined:
    Dec 3, 2007
    Messages:
    205
    Oh, I didn't know that you didn't automatically get the preset starting units in scenarios, my mistake.
     
  12. Jabarto

    Jabarto Emperor

    Joined:
    May 15, 2007
    Messages:
    1,025
    Location:
    Colorado, U.S.
    Sounds awesome! Once this comes out it might be just the ticket to get me back into Civ.
     
  13. eeveebreeder

    eeveebreeder Chieftain

    Joined:
    Jul 8, 2009
    Messages:
    19
    does this map editor hv a problem with rfc? cause whenever i edit my rfc maps sand run them it says the directory cant be found >.<
     
  14. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    What's rfc? Mayb the modpath variable isn't set correctly?
     
  15. eeveebreeder

    eeveebreeder Chieftain

    Joined:
    Jul 8, 2009
    Messages:
    19
    rfc= rhye's and fall civ and even if i save directly over the other saves, that work it says the directory cant be found :( and if i try to launch map from in game it isnt there :(
     
  16. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    Hmm, you should use a tool that tells you the differences between files and find out where the problem is.
    http://www.winmerge.org/ is a great tool for that. You can easily find out what lines might be missing.

    I'm quite sure MapView does not recognize a certain important line in the original scenario code and will not preserve it. It's probably somewhere in the game or map code of the scenario. (pretty much on top of the wbs file)
     
  17. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    So i was quite busy with MapView the last days and have introduced a lot of cool things. Personally the coolest part is definately the Python stuff. This is basicly allow you to doooo so much with Maps with very little effort.

    One of the next things i'm going to do is to preserve "unknown" stuff from scenarios. The idea behind this is to allow you to save Maps with all the information it had when you loaded them. Currently MapView will just forget everything that was not known, so it will be lost after saving. I'll add an option to cache unknown stuff and let you decide what will happen to those things when you save again. This will increase the compartibility for the craziest mods that tweaked the *.wbs file content to the max.

    Here's some very easy script you can write now:
    Code:
    #Example deleting basicly everything from a map that was loaded into mapview
    for x in range(0, current.GetWidth() ):
    	for y in range(0, current.GetHeight() ):
    		current.Tile(x,y).DeleteAllUnits();
    		current.Tile(x,y).DeleteBonus();
    		current.Tile(x,y).DeleteFeature();
    		current.Tile(x,y).DeleteRiver();
    		current.Tile(x,y).DeleteRoute();
    		current.Tile(x,y).DeleteCity();
    		current.Tile(x,y).DeleteImprovement();
    		current.Refresh(x,y) 					# Tells the render engine that this tile has changes
    
    or here is the exact same code the CreateCoast Plugin does atm. You can now write it on your own.
    Code:
    #Example deleting all units from the present map
    for x in range(0, current.GetWidth() ):
    	for y in range(0, current.GetHeight() ):
    		if current.Tile(x,y).IsNextToLand() :
    			if current.Tile(x,y).Terrain().Get() == "TERRAIN_OCEAN" :
    				current.Tile(x,y).Terrain().Set("TERRAIN_COAST")
    				current.Refresh(x,y) 			# Tells the render engine that this tile has changes
    
    I don't know when this will be released, i still have some things i want to fix first but it should be quite soon.
     
  18. OzzyKP

    OzzyKP Emperor

    Joined:
    Dec 16, 2000
    Messages:
    1,729
    Location:
    Washington, DC USA
    Hey, does the program do any map analysis? I just checked it out and I couldn't find anything that counts how many land tiles, how many tiles of each terrain type, how much forest, jungle, etc.

    Is that a possible feature you could add? Or did I just not find it?
     
  19. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    It's not in there yet but with the next version you can write that on your own.
    For example people could write a script counting land tiles like that:

    Code:
    land = 0
    for x in range(0, current.GetWidth() ):
    	for y in range(0, current.GetHeight() ):
    		if current.Tile(x,y).Terrain().GetType() != "TERRAIN_OCEAN":
    			if current.Tile(x,y).Terrain().GetType() != "TERRAIN_COAST":
    				land = land +1;
    
    print land
    
    I hope this will be sufficient.
    If you really want to have that feature NOW you could use the old MapView (Version 0.x, find it in the forum or via the wiki article)
    It has some statistical things in it but it's not as stable as this version. So it might crash.

    P.S: I wrote that request on my nice to have list. It's basicly not that hard to implement. I might realize that as plugin as soon as i finished my current work.

    Edit: I have changed to many things in the kernel and the api so i could quickly write a plugin for it, if i could, i would. ;)
     
  20. OzzyKP

    OzzyKP Emperor

    Joined:
    Dec 16, 2000
    Messages:
    1,729
    Location:
    Washington, DC USA

Share This Page