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

WBCleaner

Discussion in 'Civ4 - Utility Programs' started by AnitaGaribaldi, Apr 6, 2008.

  1. AnitaGaribaldi

    AnitaGaribaldi Warlord

    Joined:
    Jan 27, 2007
    Messages:
    290
    Location:
    Brazil
    Hi!

    I did this small utility program for me, I hope it will be useful for other. The GUI is very simple. I may add new features later on. The WorldBuilder adds some lines that make your new Scenarios created hardcoded. For example, if you want to change the start point from one civilization, it will always know some tiles from the beginning (even if it cannot see it from the new start). The WorldBuilder hardcode some civilizations characteristics like the Leader Name, if you are modding and decided to change the XML files, it will not change in the Scenario because of that.

    Reading the threads:

    http://forums.civfanatics.com/showthread.php?t=176397

    and

    http://forums.civfanatics.com/showthread.php?t=179437


    I found out how to clean maps from WorldBuilder. If I missed something, just let me know it. I really think the utility should work with Scenarios from Vanilla and BTS.

    You don't need to install the program, just open the Windows Explorer and click two times over WBCleaner.jar (requires JVM 1.4 or later - most computers have it - get a Java Run Time (JRE) if you don't have it). You will need the JDK only if you want to change the utility. The program should work with Macs too, but I don't have one to see how the GUI will look out. I haven't used the best practices to guarantee the tool will look nice in every OS. I have tested it only in Windows. If you use Mac and cannot read the GUI, send me a screen shoot, please.

    You have to type the name of the file () or press "open" to choose the file from a dialog.

    Options:
    Allows All Speeds - In section BeginGame/EndGame changes (it DOES NOT ADD the options) Speed and GameTurn, to Speed=NONE and GameTurn=0

    Clean up TeamReveal - Deletes all lines TeamReveal

    Clean up Units - Deletes all units

    Clean up Cities
    - Deletes all cities

    Clean up civs - deletes the the data of LeaderName, CivDesc, CivShortDesc, CivAdjective, FlagDecal, WhiteFlag, Color, ArtStyle, StateReligion, StartingEra, CivicOption, Handicap
    leaves the data of Team, LeaderType, CivType, PlayableCiv, MinorNationStatus, StartingGold, StartingX=, StartingY=

    I have tested the program only with Warlords (I don´t have BTS) with the WB file I saved from WorldBuilder.

    Have fun!

    File Link: WBCleaner File
     
    NiRv4n4 likes this.
  2. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    It is working with BtS WB files... :) ... Good job ;)
     
  3. AnitaGaribaldi

    AnitaGaribaldi Warlord

    Joined:
    Jan 27, 2007
    Messages:
    290
    Location:
    Brazil
    Thanks for the feedback.

    New version of the file uploaded. A small cut&paste mistake corrected. The only problem was that one button had the label in Portuguese.
     
  4. Chiyochan

    Chiyochan King

    Joined:
    Jul 28, 2007
    Messages:
    710
    Location:
    Chiyochan's Country
    It would be cool if you could expand on this and make deleting resources possible as well.
     
  5. Jabarto

    Jabarto Emperor

    Joined:
    May 15, 2007
    Messages:
    1,025
    Location:
    Colorado, U.S.
    Forgiv me for raising such an old thread, but I'm having a small problem with this utility. I've gotten much use out of it up to and including today, when it suddenly stopped working. When I try to clean a map, I get the message telling me that it succeeded, but when I check the cleaned WBS save, it's exactly the same as it was before. I've tried cleaning several different maps, updating Java, and restarting my computer, to no avail. I'm completely mystified as to what could have caused this. Anyone have any ideas?
     
  6. derflensburger

    derflensburger Chieftain

    Joined:
    Sep 12, 2006
    Messages:
    73
    Same for me:

    1. Forgive me...

    2. "cleaned!" but nothing has changed. Any ideas two years later?
     
  7. dalamb

    dalamb Deity

    Joined:
    May 9, 2006
    Messages:
    3,160
    Location:
    Kingston, Ontario
    It creates a new file in the same directory; if you used it on file X, you get cleaned_X.

    I had plans to start writing a replacement over Christmas, but got sidetracked by pneumonia.
     
  8. derflensburger

    derflensburger Chieftain

    Joined:
    Sep 12, 2006
    Messages:
    73
     
  9. dalamb

    dalamb Deity

    Joined:
    May 9, 2006
    Messages:
    3,160
    Location:
    Kingston, Ontario
    Odd; it has always worked for me.
     
  10. Xoatl_169

    Xoatl_169 Warlord

    Joined:
    May 24, 2009
    Messages:
    168
    I cant seem to get it to work :( when i click it it makes the annoying error noise. Whatever i do (including the readme suggestion) I cant do it.
     
  11. Tomberrysenior

    Tomberrysenior Chieftain

    Joined:
    Jan 28, 2010
    Messages:
    14
    Same for me, I clean the map, but all the civs remain the same, and I can't change them :/
     
  12. dalamb

    dalamb Deity

    Joined:
    May 9, 2006
    Messages:
    3,160
    Location:
    Kingston, Ontario
    What, specifically, are you trying to change?
     
  13. drunkinpenguin

    drunkinpenguin Chieftain

    Joined:
    Feb 15, 2010
    Messages:
    1
    If you are trying to change the starting civs from an official scenario, like Earth18Civs, then after using the WBCleaner program you must still open the "cleaned" worldbuildersave and edit the leader names and civ types. So, if let's say you want to change the English into the Vikings you would open the wbsave and delete "LEADER_ELIZABETH" And replace it with "LEADER_RAGNAR" you would also have to delete "CIVILIZATION_ENGLAND" and replace it with "CIVILIZATION_VIKINGS". These steps can be repeated as necessary, IF you want to remove a civ completely just delete the Leadername and leave it blank (should delete all the data under it too). This should solve your problems.

    If your going to alter the map or change civs, I recommend starting the earth18civ scenario with Egypt since they move 1st. Then simply enter WB and edit anything you want, save it under a new name. Then complete the above steps. Reload your new altered scenario and place the starting units of your new civs wherever you please and viola! You've got a new map, with the civs of your choice.

    PS, thanks for the utility, saves a lot of time deleting those data lines.
     
  14. Harrier

    Harrier Deity

    Joined:
    Feb 19, 2002
    Messages:
    2,423
    Location:
    UK
    Sorry for the bump.

    I have been using this great utility for over 3 years now.

    I last used it about 2 months ago with no problems. But now it has stopped working.

    When I double click on the .jar file instead of running, it just opens the archived file.

    Is anybody else getting this problem?

    I am using an XP system.
     
  15. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    949
    Try right click - open with... - Java SE Runtime or somthing similiar.

    (Oh, and XP isn't supported by MS anymore, so you should probably upgrade to a newer system if you're connected to the internet).
     
  16. Harrier

    Harrier Deity

    Joined:
    Feb 19, 2002
    Messages:
    2,423
    Location:
    UK
    Thanks that worked. I also changed the .jar properties so it now runs Java again rather than WinRar. So double click now works again. Do not know how it got changed.


    I know. I will eventually upgrade to Windows 10.
     

Share This Page