Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Caveman 2 Cosmos

Notices

Reply
 
Thread Tools
Old May 25, 2012, 08:40 PM   #1
Hydromancerx
C2C Modder
 
Hydromancerx's Avatar
 
Join Date: Feb 2008
Location: California, USA
Posts: 11,325
Traderoute2 Unit Upgrade Tree

As more and more Culture Units get added the more the more twisted and messy the Unit Upgrade Tree gets. In the past you would not have this problem since Unique Units would replace their base units.

So I am wondering if there could be a new tag for units that would hide them on the Unit Upgrade Tree. That way we can tag all Culture units so they hide on the tree and then you can see all the main units.

Can this be done? If so how soon?
Hydromancerx is offline   Reply With Quote
Old May 25, 2012, 09:33 PM   #2
Dancing Hoskuld
Deity
 
Join Date: Jul 2004
Location: Canberra, Australia
Posts: 11,539
The usual tag for such things is the bGraphicalOnly tag. That tag is only used in the pedia. However it may remove them from the pedia completely.

There are a number of things we need to do in the pedia like split resources into map, manufactured and cultural.
__________________
Dyslexia luRs

Member of the C2C modding team.
Dancing Hoskuld is offline   Reply With Quote
Old May 26, 2012, 10:10 AM   #3
ls612
Deity
 
ls612's Avatar
 
Join Date: Mar 2008
Location: America
Posts: 6,044
Quote:
Originally Posted by Dancing Hoskuld View Post
The usual tag for such things is the bGraphicalOnly tag. That tag is only used in the pedia. However it may remove them from the pedia completely.

There are a number of things we need to do in the pedia like split resources into map, manufactured and cultural.
How about writing into the unit upgrade tree code to ignore all units that have <iMaxPlayerInstances> of 15 and <iInstanceCostModifier> of 2? That would get all of the Culture Units and hopefully very little, if nothing else.
__________________
My Projects:
Caveman2Cosmos
ls612 is offline   Reply With Quote
Old May 26, 2012, 02:43 PM   #4
Dancing Hoskuld
Deity
 
Join Date: Jul 2004
Location: Canberra, Australia
Posts: 11,539
Quote:
Originally Posted by ls612 View Post
How about writing into the unit upgrade tree code to ignore all units that have <iMaxPlayerInstances> of 15 and <iInstanceCostModifier> of 2? That would get all of the Culture Units and hopefully very little, if nothing else.
Except of course a number of "my" units which people insisted should be 15. It would be just as easy (read difficult) to base it on a prerequsite that is a culture as a max number as both require looking at a secondary file.

Having that tag I mentioned set does stop the unit appearing in the pedia (index and upgrade tree) but you can still get to the pedia entry for it.
__________________
Dyslexia luRs

Member of the C2C modding team.
Dancing Hoskuld is offline   Reply With Quote
Old May 26, 2012, 06:27 PM   #5
Hydromancerx
C2C Modder
 
Hydromancerx's Avatar
 
Join Date: Feb 2008
Location: California, USA
Posts: 11,325
How do you get to the pedia without it showing up?
Hydromancerx is offline   Reply With Quote
Old May 27, 2012, 12:09 AM   #6
Dancing Hoskuld
Deity
 
Join Date: Jul 2004
Location: Canberra, Australia
Posts: 11,539
I right click on a unit and I go to the pedi page. No need for the index.
__________________
Dyslexia luRs

Member of the C2C modding team.
Dancing Hoskuld is offline   Reply With Quote
Old May 27, 2012, 01:14 AM   #7
Hydromancerx
C2C Modder
 
Hydromancerx's Avatar
 
Join Date: Feb 2008
Location: California, USA
Posts: 11,325
Quote:
Originally Posted by Dancing Hoskuld View Post
I right click on a unit and I go to the pedi page. No need for the index.
I mean how do you do it without start up a game.
Hydromancerx is offline   Reply With Quote
Old May 27, 2012, 01:15 AM   #8
Dancing Hoskuld
Deity
 
Join Date: Jul 2004
Location: Canberra, Australia
Posts: 11,539
Quote:
Originally Posted by Hydromancerx View Post
I mean how do you do it without start up a game.
You don't.
__________________
Dyslexia luRs

Member of the C2C modding team.
Dancing Hoskuld is offline   Reply With Quote
Old May 27, 2012, 01:28 AM   #9
Hydromancerx
C2C Modder
 
Hydromancerx's Avatar
 
Join Date: Feb 2008
Location: California, USA
Posts: 11,325
If that's the case I think i would like to keep the Megafauna and "Punk" units visible, but then make the other culture units hidden. That should thin down the tree to see the upgrades better.
Hydromancerx is offline   Reply With Quote
Old Jun 23, 2012, 11:23 AM   #10
AIAndy
Deity
 
Join Date: Jun 2011
Posts: 3,034
Quote:
Originally Posted by Hydromancerx View Post
As more and more Culture Units get added the more the more twisted and messy the Unit Upgrade Tree gets. In the past you would not have this problem since Unique Units would replace their base units.

So I am wondering if there could be a new tag for units that would hide them on the Unit Upgrade Tree. That way we can tag all Culture units so they hide on the tree and then you can see all the main units.

Can this be done? If so how soon?
Well, the option is there, except that it is not in the XML.
Check Assets/Python/Contrib/UnitUpgradesGraph.py.
Near the start of that script there is this:
Code:
#The exception list allow you to completely hide a unit from the upgrade graph.
#This is useful for mods that use an unreachable unit to keep others from expiring.
#unitExceptionList = [UNIT_UNREACHABLE]
unitExceptionList = []

#The split lists let you split a particular unit into several different graphs, so it doesn't hold several
#upgrade paths together that would look better separate.  For instance, you might have a Ranger unit that
#upgrades from both a Scout and Warrior unit, but otherwise Scouting and Fighting units are in their own
#trees.  In this case, you would place the Ranger in the SplitIncoming list, to get the program to split up
#the incoming upgrades to Ranger so that Ranger shows up in both trees without holding them together.
#unitSplitIncoming = [UNIT_RANGER, UNIT_STYGIAN_GUARD]
unitSplitIncoming = []

#SplitOutgoing is similar, but for a unit that holds together two trees by what it upgrades to.  For instance,
#you might have a commoner unit that upgrades to Scout, Warrior, and Worker, while otherwise those units have
#their own trees.  Using the SplitOutgoing list will just put a commoner at the start of each of the 3 trees
#unitSplitOutgoing = [UNIT_DWARVEN_SOLDIER]
unitSplitOutgoing = []
Currently it seems like only the promotions version is used a bit: promotionsSplitIncoming

While that is certainly something that can and should be added to the XML, for now you can use the options in this script to get the upgrade tree to look better.
AIAndy is offline   Reply With Quote
Old Jun 23, 2012, 02:54 PM   #11
Hydromancerx
C2C Modder
 
Hydromancerx's Avatar
 
Join Date: Feb 2008
Location: California, USA
Posts: 11,325
@AIAndy

Yeah. At the moment if you have too many links (more than 15) then the left side of the tree will mess all up into chaos. Likewise all the Unique units are cluttering up the main tree and as a result its harder to read. Thus there are 2 issues ...

1. Getting the tree to be wider than 15 units so it will not make "cluster chaos".

2. Hiding units from the tree so its easier to read.
Hydromancerx is offline   Reply With Quote
Old Jun 23, 2012, 03:09 PM   #12
ls612
Deity
 
ls612's Avatar
 
Join Date: Mar 2008
Location: America
Posts: 6,044
Quote:
Originally Posted by Hydromancerx View Post
@AIAndy

Yeah. At the moment if you have too many links (more than 15) then the left side of the tree will mess all up into chaos. Likewise all the Unique units are cluttering up the main tree and as a result its harder to read. Thus there are 2 issues ...

1. Getting the tree to be wider than 15 units so it will not make "cluster chaos".

2. Hiding units from the tree so its easier to read.
Removing the Culture units from the Upgrade Tree will help with the vertical spacing of the tree, not the horizontal spacing. I don't think that there is any appreciable limit to the vertical spacing, so removing the Culture Units will make things look nicer only if the horizontal spacing issue is fixed.
__________________
My Projects:
Caveman2Cosmos
ls612 is offline   Reply With Quote
Old Jun 23, 2012, 04:09 PM   #13
AIAndy
Deity
 
Join Date: Jun 2011
Posts: 3,034
Quote:
Originally Posted by Hydromancerx View Post
@AIAndy

Yeah. At the moment if you have too many links (more than 15) then the left side of the tree will mess all up into chaos. Likewise all the Unique units are cluttering up the main tree and as a result its harder to read. Thus there are 2 issues ...

1. Getting the tree to be wider than 15 units so it will not make "cluster chaos".

2. Hiding units from the tree so its easier to read.
You can do number 2 with the unitExceptionList.
Unfortunately the algorithm did not seem to come to a conclusion in the time I was willing to wait so I have not seen 1. It might be that it does not do enough iterations of the layout algorithm.
AIAndy is offline   Reply With Quote
Old Aug 06, 2012, 06:14 PM   #14
Hydromancerx
C2C Modder
 
Hydromancerx's Avatar
 
Join Date: Feb 2008
Location: California, USA
Posts: 11,325
Could we get the unit upgrade tree to be wider than 15 units? Its going super squishing currently so much so that units are appearing in revers order such as the Rock Thrower is a column after the Slinger and the Archer appears on the Same row as the Slinger. It should go ...

Rock Thrower -> Slinger -> Atl-Atl -> Archer

Last edited by Hydromancerx; Feb 26, 2013 at 07:54 PM.
Hydromancerx is offline   Reply With Quote
Old Aug 07, 2012, 06:12 PM   #15
Hydromancerx
C2C Modder
 
Hydromancerx's Avatar
 
Join Date: Feb 2008
Location: California, USA
Posts: 11,325
@AIAndy

Is there a way to set a width for the window or even the ability to set them in sports like how the tech tree works?
Hydromancerx is offline   Reply With Quote
Old Aug 07, 2012, 06:41 PM   #16
AIAndy
Deity
 
Join Date: Jun 2011
Posts: 3,034
Quote:
Originally Posted by Hydromancerx View Post
@AIAndy

Is there a way to set a width for the window or even the ability to set them in sports like how the tech tree works?
There is no limit to the width. It is determined by the layout algorithm.
I have now doubled the number of iterations to get a better rendering at the cost of calculation time.
AIAndy is offline   Reply With Quote
Old Aug 07, 2012, 07:41 PM   #17
Hydromancerx
C2C Modder
 
Hydromancerx's Avatar
 
Join Date: Feb 2008
Location: California, USA
Posts: 11,325
Quote:
Originally Posted by AIAndy View Post
There is no limit to the width. It is determined by the layout algorithm.
I have now doubled the number of iterations to get a better rendering at the cost of calculation time.
Yay! It worked!! Nice job! Now they are not so squished anymore. Its still messy, but that's because of what units each unit upgrades to. Thank you! Its actuality readable again!
Hydromancerx is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Caveman 2 Cosmos > Unit Upgrade Tree

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Advertisement

All times are GMT -6. The time now is 01:37 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR