Adding promotions to certain units

uhhh need to change the xml in your custom version of ... CIV4PromotionInfos.xml, scroll down and find the start of the 'promotion_sentry' entry
 

Attachments

  • two bits you have to change.txt
    768 bytes · Views: 121
uhhh need to change the xml in your custom version of ... CIV4PromotionInfos.xml, scroll down and find the start of the 'promotion_sentry' entry

Hey, since you seem to know what you're doing, mind takin a look? ;p
I made my own promotion, everything's schmancy with that, but trying to put my icon into the .PAK file is perplexing me. Every time I compile a .pak with PakBuild, it creates it with no folder structure (Art\Interface\ etc.). Any ideas :0?

Moderator Action: Edited your post to remove inappropriate language. Please help us keep our forums family friendly. Thanks. leif
 
Last edited by a moderator:
oops sorry LumpyLen, never built an fpk before … xml really is fairly to use once you get over the learning curve

would be interested in finding out why you use fpk, please pm me
 
uhhh need to change the xml in your custom version of ... CIV4PromotionInfos.xml, scroll down and find the start of the 'promotion_sentry' entry

after looking at that that does change for every unit however I'm just wanting to change it for archer class only. Or at least have the promotion for city garrison 1
 
Last edited:
ok suggest you clone the promotion and append it to promos.xml
- this will produce same effects, uses different button art
-available if you have either cbt-1 or c-grn-1 and unitcombat_archer
 

Attachments

  • sentry-for-cripp7.txt
    2.5 KB · Views: 100
hello cripp7 sorry boss ... should have switched my brane on for a moment

ok adding to these xml files involves nesting the entries inside a grander structure
 

Attachments

  • cripp7-xml-structure.txt
    1.5 KB · Views: 108
Yeah, all entries should start with <PromotionInfo> and end with </PromotionInfo>
if you're going alter a lot of xml it might be wise to get an xml checker
there IS another way of doing it, involving changes to unitinfos.xml and the existing PROMOTION_SENTRY, but it's more annoying imho
 
off sorry i assumed you were using vanilla bts ... (looks at file) ah it does look pretty much like vanilla bts ... I always thought this

<Button>,Art/Interface/Buttons/Promotions/Logistics1.dds</Button>

threw an error, you live and learn ... I wouldn't start with the initial comma, so maybe this isn't a vanilla version? I assumed

<Button>Art/Interface/Buttons/Promotions/Combat1.dds</Button>

or

<Button>,Art/Interface/Buttons/Promotions/Combat1.dds,Art/Interface/Buttons/Promotions_Atlas.dds,8,2</Button>
were they only valid syntaxes for button display. I assume you've been using it without errors, and spy promotions are displaying fine?

ok insert new bit of xml 'new promo cripp7.txt' between PROMOTION_SENTRY and PROMOTION_MOBILITY entries. The preceding entry and succeeding entries are included.

- make sure it starts and ends with the right tags, and you haven't overwritten the preceding and succeeding entries

(preceding entry end)
</PromotionInfo>
<PromotionInfo>
(inserted entry start and end)
</PromotionInfo>
(succeeding entry start)
<PromotionInfo>

I really recommend getting an xml checker, a good one is: Caveman2Cosmos XML Validator 1.3 by Alberts2

... and I'm capable of making errors as anyone, not sure why it crashed on loading. I assumed you tried again with the original civ4promotions.xml file and it loaded ok?
 

Attachments

  • new promo cripp7.txt
    8.1 KB · Views: 101
Oh I did forget to mention that I'm using a moded version of RevolutionDCM, yes by spies promotions are showing up correctly. I'm using Winmerge to do my editing and I'll try the Caveman2Cosmos XML checker just to make sure. I'll make those changes and let you kno

I'm still not quite sure of your directions, I was able to get the Explorer unit to automatically assign the Sentry to it but not any of the others.
 
Last edited:
@cripp7
Winmerge is a very useful program to compare two similar files or even folders but I think it's not the best choice for XML editing.
Let me suggest you trying FOXE:
http://www.firstobject.com/dn_editor.htm

A very simple but powerful program. I learned a lot about the way of XML working just by using it.
 
Top Bottom