[DISCUSSION] Goody Tags

Isabelxxx

Prince
Joined
Sep 26, 2010
Messages
399
This is the current structure for goodies:

Code:
		<GoodyInfo>
			<Type>GOODY_TEACH_PROFESSION_BRAVE</Type>
			<Description>TXT_KEY_PROFESSION_BRAVE</Description>
			<Sound>AS2D_GOODY_XP</Sound>
			<AnnounceText>TXT_KEY_GOODY_ANNOUNCE_HELP_TO_NATIVES</AnnounceText>
			<ChiefText>TXT_KEY_CHIEF_GOODY_EXPERIENCE</ChiefText>
			<iGold>0</iGold>
			<iGoldRand1>0</iGoldRand1>
			<iGoldRand2>0</iGoldRand2>
			<iMapOffset>0</iMapOffset>
			<iMapRange>0</iMapRange>
			<iMapProb>0</iMapProb>
			<iExperience>0</iExperience>
			<iHealing>0</iHealing>
			<iDamagePrereq>0</iDamagePrereq>
			<bBad>0</bBad>
			<bWar>0</bWar>
			<UnitClass>NONE</UnitClass>
			<TeachUnitClass>UNITCLASS_CONVERTED_NATIVE</TeachUnitClass>
			<iCityGoodyWeight>100</iCityGoodyWeight>
			<GoodyWeights/>
		</GoodyInfo>


Note that there is a way to teach an unit class

Code:
<TeachUnitClass>UNITCLASS_CONVERTED_NATIVE</TeachUnitClass>

But there is no way to teach a profession, have a required unit_class, etc.

Imagine that I want to convert with a goody event only my soldiers to veteran soldiers, how can I do it? I can't, this event would apply to any type of unit.
The idea here is to apply some goodies to specific units (that is already checked in the DLL but some changes and XML tags are required). My suggestions:


<UnitClassRequired> The goody would only be activated for the required unit class. Otherwise we eliminate these goodies events from the possible list to be activated.
<ProfessionRequired> The same but for professions.
<TeachProffesion> The unit would learn the selected profession. Not sure if any profession would be valid... For ex. I would want to teach converted natives a profession restricted to real natives (PROFESSION_ARMED_BRAVE) but since it's forbidden for that unit not sure if it could be possible.


Also, if this is really considered, I would suggest some type of optimization here. Instead of 3 types of goodies in the XML file (imagine I want to convert soldiers in veterans, converted natives in soldiers, doctors in expert doctors, etc.) the structure could be changed.




This would be the 1st option considering the new tags. Here the goody would convert converted natives to regulars, colonists with soldier profession and regulars to veterans. We need at least 3 new events (many more if we add variations with professions).

Code:
		<GoodyInfo>
			<Type>GOODY_TEACH_PROFESSION_BRAVE</Type>
			<Description>TXT_KEY_PROFESSION_BRAVE</Description>
			<Sound>AS2D_GOODY_XP</Sound>
			<AnnounceText>TXT_KEY_GOODY_ANNOUNCE_HELP_TO_NATIVES</AnnounceText>
			<ChiefText>TXT_KEY_CHIEF_GOODY_EXPERIENCE</ChiefText>
			<iGold>0</iGold>
			<iGoldRand1>0</iGoldRand1>
			<iGoldRand2>0</iGoldRand2>
			<iMapOffset>0</iMapOffset>
			<iMapRange>0</iMapRange>
			<iMapProb>0</iMapProb>
			<iExperience>0</iExperience>
			<iHealing>0</iHealing>
			<iDamagePrereq>0</iDamagePrereq>
			<bBad>0</bBad>
			<bWar>0</bWar>
			<UnitClass>NONE</UnitClass>
			<UnitClassRequired>UNITCLASS_REGULAR</UnitClassRequired>
			<ProfessionRequired>NONE</ProfessionRequired>
			<TeachUnitClass>UNITCLASS_VETERAN</TeachUnitClass>
			<TeachProffesion>NONE</TeachProffesion>
			<iCityGoodyWeight>100</iCityGoodyWeight>
			<GoodyWeights/>
		</GoodyInfo>

<GoodyInfo>
			<Type>GOODY_TEACH_PROFESSION_BRAVE</Type>
			<Description>TXT_KEY_PROFESSION_BRAVE</Description>
			<Sound>AS2D_GOODY_XP</Sound>
			<AnnounceText>TXT_KEY_GOODY_ANNOUNCE_HELP_TO_NATIVES</AnnounceText>
			<ChiefText>TXT_KEY_CHIEF_GOODY_EXPERIENCE</ChiefText>
			<iGold>0</iGold>
			<iGoldRand1>0</iGoldRand1>
			<iGoldRand2>0</iGoldRand2>
			<iMapOffset>0</iMapOffset>
			<iMapRange>0</iMapRange>
			<iMapProb>0</iMapProb>
			<iExperience>0</iExperience>
			<iHealing>0</iHealing>
			<iDamagePrereq>0</iDamagePrereq>
			<bBad>0</bBad>
			<bWar>0</bWar>
			<UnitClass>NONE</UnitClass>
			<UnitClassRequired>NONE</UnitClassRequired>
			<ProfessionRequired>PROFESSION_SOLDIER_ERA_0</ProfessionRequired>
			<TeachUnitClass>UNITCLASS_VETERAN</TeachUnitClass>
			<TeachProffesion>PROFESSION_SOLDIER_ERA_0</TeachProffesion>
			<iCityGoodyWeight>100</iCityGoodyWeight>
			<GoodyWeights/>
		</GoodyInfo>

<GoodyInfo>
			<Type>GOODY_TEACH_PROFESSION_BRAVE</Type>
			<Description>TXT_KEY_PROFESSION_BRAVE</Description>
			<Sound>AS2D_GOODY_XP</Sound>
			<AnnounceText>TXT_KEY_GOODY_ANNOUNCE_HELP_TO_NATIVES</AnnounceText>
			<ChiefText>TXT_KEY_CHIEF_GOODY_EXPERIENCE</ChiefText>
			<iGold>0</iGold>
			<iGoldRand1>0</iGoldRand1>
			<iGoldRand2>0</iGoldRand2>
			<iMapOffset>0</iMapOffset>
			<iMapRange>0</iMapRange>
			<iMapProb>0</iMapProb>
			<iExperience>0</iExperience>
			<iHealing>0</iHealing>
			<iDamagePrereq>0</iDamagePrereq>
			<bBad>0</bBad>
			<bWar>0</bWar>
			<UnitClass>NONE</UnitClass>
			<UnitClassRequired>UNITCLASS_CONVERTED_NATIVE</UnitClassRequired>
			<ProfessionRequired>NONE</ProfessionRequired>
			<TeachUnitClass>UNITCLASS_REGULAR</TeachUnitClass>
			<TeachProffesion>NONE</TeachProffesion>
			<iCityGoodyWeight>100</iCityGoodyWeight>
			<GoodyWeights/>
		</GoodyInfo>

This could be easily optimized if we change the XML tags to do this:

Code:
<GoodyInfo>
			<Type>GOODY_TEACH_PROFESSION_BRAVE</Type>
			<Description>TXT_KEY_PROFESSION_BRAVE</Description>
			<Sound>AS2D_GOODY_XP</Sound>
			<AnnounceText>TXT_KEY_GOODY_ANNOUNCE_HELP_TO_NATIVES</AnnounceText>
			<ChiefText>TXT_KEY_CHIEF_GOODY_EXPERIENCE</ChiefText>
			<iGold>0</iGold>
			<iGoldRand1>0</iGoldRand1>
			<iGoldRand2>0</iGoldRand2>
			<iMapOffset>0</iMapOffset>
			<iMapRange>0</iMapRange>
			<iMapProb>0</iMapProb>
			<iExperience>0</iExperience>
			<iHealing>0</iHealing>
			<iDamagePrereq>0</iDamagePrereq>
			<bBad>0</bBad>
			<bWar>0</bWar>
			<UnitClass>NONE</UnitClass>
			<TeachUnitClassCondtions>
				<UnitClassProfessionRequired>
					<UnitClassRequired>UNITCLASS_CONVERTED_NATIVE</UnitClassRequired>
					<ProfessionRequired>NONE</ProfessionRequired>
					<TeachUnitClass>UNITCLASS_REGULAR</NewUnitClass>
					<TeachProffesion>NONE</TeachProffesion>
				</UnitClassProfessionRequired>
				<UnitClassProfessionRequired>
					<UnitClassRequired>NONE</UnitClassRequired>
					<ProfessionRequired>PROFESSION_SOLDIER_ERA_0</ProfessionRequired>
					<TeachUnitClass>UNITCLASS_VETERAN</NewUnitClass>
					<TeachProffesion>PROFESSION_SOLDIER_ERA_0</TeachProffesion>
				</UnitClassProfessionRequired>
				<UnitClassProfessionRequired>
					<UnitClassRequired>UNITCLASS_VETERAN</UnitClassRequired>
					<ProfessionRequired>NONE</ProfessionRequired>
					<TeachUnitClass>UNITCLASS_VETERAN</NewUnitClass>
					<TeachProffesion>NONE</TeachProffesion>
				</UnitClassProfessionRequired>
			<iCityGoodyWeight>100</iCityGoodyWeight>
			<GoodyWeights/>
		</GoodyInfo>


This way we have merged 3 events into one, we can add some type of conditions related to unit class and professions and finally teach new professions and unit class according to those conditions.
 
I see that you have a lot of ideas! We observe once again, that the game is really poor.
That why, after the next version (or patch ^^), we will work on the economy and exploration part. And you will see that our exploration system will revolutionize the way we play to Colonization. I kept the secret of my future changes, because I wish you have the surprise :p.
 
Let me know if you consider to implement the tag optimization and the 3 new tags or not since this require small DLL changes, so I would start the work in the XML files now.

I already did all the goody events as I wrote; but if this is finally implemented (and these are in my opinion the only changes needed in goody events), I will have to change all the XML file to match the new schema.
 
I'm just working on this and created some new functionality.

New goody tag: exploration experience points

A new tag: ucExploAndNavigationExperience unsigned char (ui1)
Using the new XML load system.

Lets us to specify the amount of exploration experience given by the goody to scouts
So now the system work this way: if the unit is not an scout will receive the value of "iExperience" tag for that goody. And that experience will be normal experience.
For scouts "ucExploAndNavigationExperience" will be used instead, and the experience is asigned to Exploration experience.
You can not give both experience types to same unit (it will receive only one considering previous rules), but you can add both values to the same goody. That's said: it will work one way for common units and the other way for scouts, but it's the same goody type. No need to create 2 different goody types for that.

Note that in previous versions the iExperience tag is deprecated since only Explo experience was given, and only to scouts. And that value was fixed.

Now both systems work together and are fully configurable.


Map concept improvements

Also added a new functionality to goodies which gives maps. Now any unit can receive that map (this is considered a forced map) and that only works for goodies. No need to use scouts or ships, so you can send a soldier to a goody (or city) obtain a map and that map will not be lost because soldiers can not manage maps by default.
That's why "it's forced". The unit will not use any other feature associated to maps present for scouts or ships, but can give the map to other units (scout or ship) and transfer it to Europe or a City to make it definitively revealed.
All this just simplify and polish the map concept (explorers are needed for exploring but any colonist can "save" the map already made by other explorers and return it to homeland), so now it should be much clearer.
 
Top Bottom