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

IndieStone - Visual Tech Tree Editor

Discussion in 'Civ5 - Utility Programs' started by lemmy101, Oct 28, 2010.

  1. Le Sage

    Le Sage Emperor

    Joined:
    Apr 24, 2009
    Messages:
    1,522
    Location:
    Digging up your garden
    You should update the version number on the download too, so we all can be sure that we're downloading the absolute latest version of the utility. Don't stop the frequent updating though, for God's sake!
     
  2. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    ****. Had a momentary power cut that reset our machines. Lost a bunch of stuff. Lucky I had an out of date back up but will take a while to get back up to speed. :(
     
  3. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    New version uploaded!

    NEW LINK: http://www.theindiestone.com/lemmyandbinky.com/civ2/IndieStoneTechTreeEditor0_9.zip

    version 0.9c

    * Splash screen with version number.
    * Added comparison operators to sql ( < , > , <= , >=, !=, <> )
    * Added 'select' statements which pop up a list of all items returned in select.

    Code:
    select type, cost, combat from units where type > UNIT_P and cost < 100


    Double click any of the results to open the row editor for that row. You can now edit ANYTHING in the database. :)
     
  4. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    (Moved from earlier in the thread to update with new info)

    The editor now has SQL support! As well as being able to load up mods with SQL files in them, you can enter them straight into the console to quickly edit your database.



    In the console at the bottom, you can type select, update and delete statements (the only ones supported so far) and hit return to edit the database on the fly, be that deleting techs or setting values. Using this and the row editor you've got quite the power to edit your whole mod within the editor.

    Stuff like:

    Delete

    Code:
    delete from units
    Deletes all units.

    Code:
    delete from units where type=UNIT_ARCHER
    Deletes the archer

    Code:
    delete from units where prereqtech=tech_bronzeworking
    Deletes all units on bronze working. Note that where statements are case insensitive.

    Code:
    delete from technologies where era=era_classical and goodytech=false
    Delete all techs in classical era that aren't goody hut techs.

    Update

    Code:
    update units set portraitindex=10
    Sets portrait index on all units.

    Code:
    update units set portraitindex=10, iconatlas=UNIT_ATLAS_1
    Sets all units portaitindex AND iconatlas. Note the values for a set are case sensitive as it will obviously put in the table whatever you write and cannot magically figure out what case you intended. The actual property name case still doesn't matter though.

    Code:
    update units set portraitindex=10, iconatlas=UNIT_ATLAS_1 where prereqtech=tech_bronzeworking and goodytech=true
    Updates can have wheres too...

    Select

    Code:
    select * from technology_prereqtechs
    Returns a list of every tech prereq, and the list has columns for every property of the prereq (* = all columns)



    Double click any of the results to open the row editor for that row.

    Code:
    select type, cost, combat from units where type > UNIT_P and cost < 100
    Returns a list of every unit with a type beginning alphabetically with UNIT_P or higher, and costing less than 100. Only gets and displays the type, cost and combat columns.



    You can click a header to sort by that column.

    Things that aren't supported (yet):

    * insert into
    * create/drop tables
    * or statements / bracketing
    * nested statements

    ----

    Other non-sql commands

    You can also type 'list' into the console to get a list of every table in the game, double click them to get a full select list of all the rows, double click them to get to the row editor for that row.



    That's complete database editing from one place.

    ---------------

    If any command you try fails, post it here and I'll either tell you what you did wrong or add support for / fix that particular command.
     
  5. Le Sage

    Le Sage Emperor

    Joined:
    Apr 24, 2009
    Messages:
    1,522
    Location:
    Digging up your garden
    The Right Buttons when editing unit copies don't quite work. They just stopped working for me when I edited the Civilopedia entries. The unit editing is already very good though. I can easily make a new unit for the French in there.
     
  6. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    Uploaded version 0.9d

    * Made best guesses for some properties that have common 'language' names ('description', 'strategy' etc) in row editor where firaxis didn't add a reference in xml table used for auto-complete and drill down.
    * Added a pop-up yes/no option to create a new row when attempting to drill down (->) into non-existent entry in row editor property.
    * Fixed bug causing text entry changes not to work in row editor.
     
  7. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    Uploaded version 0.9.1a

    * Added 'list' command for console to bring up a list of all tables in the database, you can double click these to see all the rows, then double click the row to get the row editor.



    * Added support for SQL files in mods (as long as they don't have anything mental in them and use the same statements the console supports, aka standard update and deletes. Otherwise it'll just bail out on that file. The fixnator is an example of 'mental' since it has nested statements and inserts etc, but since this handles fixinating itself this doesn't matter) Now, for example, you can load in Ahwaric and Pazyryk's empty mod http://forums.civfanatics.com/showthread.php?t=396448 and clear out everything from the editor (though there are a few conflicts you guys should look into :D)
     
  8. Decimatus

    Decimatus King

    Joined:
    Oct 22, 2005
    Messages:
    853
    So I looked into some of the problems a bit more.

    When I reloaded it back into the editor, the titles were also jacked up as they were in the game. So, I fixed them and will test to see if it sticks this time.

    For the techs where they had the wrong civ/quote/etc tags, they had the correct tags, its just that for some reason the text in those tags happened to be the tag line from some other tech. Not sure how it happened.


    Another thing that I forgot to report, and happened again despite my fixing it when it happened the first time. And it happened to the same techs, so maybe there is something there...

    Certain buildings and units are shown in the tech, but they are also shown in the unassigned window. I can't grab them when they are on the tech, but I can grab them from the unassigned and place them in the tech and which point only 1 of them remains, and I can move and manipulate it.

    The examples(each grouping shares a tech):

    Temple is ghosted, but Mahabodhi Temple isn't.
    Courthouse and Hanging Gardens are both ghosted.
    Catapult and Ballista are ghosted, but Artillery Range isn't.
    Chariot Archer, War Chariot, and War Elephant are ghosted, but Circus Maximus isn't.
    Heroic Epic is ghosted.
    Pikemen, Landsknecht, and Kremlin are ghosted, but Sewer System and Art of War aren't.
    Theatre is ghosted, but Shakespear's Theater isn't.
    Cavalry and Military Academy are ghosted.
    Taj Mahal is ghosted but Grand Mosque isn't.
    Submarine is ghosted, but Oil Refinery and Naval Base aren't.
    Pentagon is ghosted, but Telecommunications Network isn't.
    Solar Plant is ghosted.
    Jet Fighter and Gunship are ghosted, but Airport isn't.
    GDR is ghosted, but Mecha Plant isn't.


    These all work in the game, but when you editor looks at them(even after I reassigned them, exported it with your editor, and then reimported) it doesn't like them.
     
  9. Decimatus

    Decimatus King

    Joined:
    Oct 22, 2005
    Messages:
    853
    Oh, and I am not sure if this happened in the first time I loaded it(besides once), but I am seeing a lot of prereq pipes that are displayed quite wrong. Some pipes that seem to be running from behind the tech out of nowhere, but when I delete them it also deletes a prereq pipe that was leading to another tech from the other side.

    Going to do some cleaning up and see how it looks on a reload.

    Actually, this is a pretty big problem. It seems like many of these are triple and quadruple stacked, and when I begin to delete them, random other pipes around it are disappearing.
     
  10. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    Yikes. I will work through all these tomorrow, thanks for the feedback!

    I would appreciate a copy of the files that produce this error if you could send me them? lemmy101 at gmail. com, it would be quicker for me to fix with a broken mod instead of trying to replicate it.

    Thanks :)
     
  11. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    Version 0.9.1b released.

    * In-place editing names of techs by clicking on the label...

     
  12. Decimatus

    Decimatus King

    Joined:
    Oct 22, 2005
    Messages:
    853
    Oh and worst yet, some of the prereq pipes are going through the techs. So it looks like a tech has a prereq tech right behind it, but it is really coming from a tech even behind that one.

    And It seemed to look fine in the game I loaded it into yesterday, so I am not sure how many of these are visually bugged, or if they really uploaded like that...
     
  13. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    Hmm well if I can have a nose I'll get a fix sorted asap. if you're super quick I may squeeze it in before bedtime. :)
     
  14. Decimatus

    Decimatus King

    Joined:
    Oct 22, 2005
    Messages:
    853
    One more I forgot to report but that keeps coming back. The era's keep changing sizes, despite fixing them the first time I uploaded. Like Classical is now 1 tech wide, so I have to expand it out manually. And I have to be careful, because if I expand it's last line to cover the last line of the next era(which is possible because of how some of them are smashed), then I have to split and rename eras. It generally becomes a mess if I do that.

    One time I loaded it up, the last 2 eras were even missing completely(modern stretched on endlessly) so I had to recreate them from scratch.
     
  15. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
  16. Decimatus

    Decimatus King

    Joined:
    Oct 22, 2005
    Messages:
    853
    One sec and I will put it up on my sourceforge.
     
  17. Decimatus

    Decimatus King

    Joined:
    Oct 22, 2005
    Messages:
    853
  18. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
  19. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    Okay, so there's a version there now which fixes the issue with the tech lines.

    will need to look into the description text issue a bit more. Will be easier now I have the problem in front of me. There seems to be some feedback loop going on where it keeps resetting the description and the description text and adding TXT_KEY to the start each time.
     
  20. Decimatus

    Decimatus King

    Joined:
    Oct 22, 2005
    Messages:
    853
    Cool.

    I fixed everything, re-exported it, and it seems to look fine at first glance.

    There are a couple semi-broken pipes in the game, but it is the usual business that is common to the way the game tries to run the pipes.

    I will do some more tinkering with it after I get back from lunch.

    So far it is pretty great. The best part about it is that it is so much better for planning the tech tree even with the current bugs. Before, planning out whole eras had me sitting there with a pen and paper all gridded out trying to plan my moves, and then scratching things out as I got them in the game and saw what was and wasn't going to work.

    When this thing is finished, even the people who couldn't figure out XML's will be able to make vast, sweeping changes to the game.
     

Share This Page