 |
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:18
|
|
This should be the slic code for the new feats:
PHP:
HandleEvent(GrantAdvance) 'MG_AccomplishFeats' post { // when player gets an advance
int_t advanceType;
int_t i;
int_t MGCity;
int_t MGPopAdd;
advanceType = value[0];
advance[0] = advanceType;
if (advanceType == AdvanceDB(ADVANCE_CURRENCY)
|| advanceType == AdvanceDB(ADVANCE_MACHINE_TOOLS)
|| advanceType == AdvanceDB(ADVANCE_INDUSTRIAL_REVOLUTION)) {
Event:AccomplishFeat(FeatDB(FEAT_PLUS10%_PRODUCT ION), player[0]);
//AddFeat(featIndex, playerIndex)//no idea if the AccomplishFeat event gives you more than once the same feat, maybe the AddFeat function
}
elseif (advanceType == AdvanceDB(ADVANCE_APPLIED_MATH)
|| advanceType == AdvanceDB(ADVANCE_BUREAUCRACY)
|| advanceType == AdvanceDB(ADVANCE_ECONOMICS)) {
Event:AccomplishFeat(FeatDB(FEAT_PLUS10%_COMMERC E), player[0]);
}
// elseif (advanceType == AdvanceDB(ADVANCE_GRANARIES)
// || advanceType == AdvanceDB(ADVANCE_AGRICULTURAL_REVOLUTION)) {
// Event:AccomplishFeat(FeatDB(FEAT_PLUS10%_FOOD), player[0]);
// }//no idea how to write this feat in feat.txt yet
elseif (advanceType == AdvanceDB(ADVANCE_PHILOSOPHY)
|| advanceType == AdvanceDB(ADVANCE_CLASSICAL_EDUCATION)
|| advanceType == AdvanceDB(ADVANCE_CHEMISTRY)) {
Event:AccomplishFeat(FeatDB(FEAT_PLUS10%_SCIENCE ), player[0]);
}
elseif (advanceType == AdvanceDB(ADVANCE_ETHICS)
|| advanceType == AdvanceDB(ADVANCE_RENAISSANCE)
|| advanceType == AdvanceDB(ADVANCE_CRIMINAL_CODE)) {
Event:AccomplishFeat(FeatDB(FEAT_PLUS1_HAPPINESS ), player[0]);
}
elseif (advanceType == AdvanceDB(ADVANCE_SLAVE_LABOR)
|| advanceType == AdvanceDB(ADVANCE_FEUDALISM)) {
Event:AccomplishFeat(FeatDB(FEAT_MINUS1_HAPPINES S), player[0]);
}
elseif (advanceType == AdvanceDB(ADVANCE_ARCHITECTURE)//adds 10% population to each city when these advances are discovered
|| advanceType == AdvanceDB(ADVANCE_MECHANICAL_CLOCK)
|| advanceType == AdvanceDB(ADVANCE_CORPORATION)) {
message(player[0],'Feat10%MorePopsPerCity');
for(i = 0; i < player[0].cities; i = i + 1) {
GetCityByIndex(player[0], i, MGCity);
if(CityisValid(MGCity)) {
MGPopAdd = MGCity.population/10;
AddPops(MGCity, MGPopAdd);
}
}
}
}
messagebox 'FeatPlus10%Production' {
Show();
Title(ID_FEAT_ACCOMPISHED_TITLE);
Text(ID_FEAT_PLUS10%_PRODUCTION);
}
messagebox 'FeatPlus10%Commerce' {
Show();
Title(ID_FEAT_ACCOMPISHED_TITLE);
Text(ID_FEAT_PLUS10%_COMMERCE);
}
messagebox 'FeatPlus10%Sience' {
Show();
Title(ID_FEAT_ACCOMPISHED_TITLE);
Text(ID_FEAT_PLUS10%_SCIENCE);
}
messagebox 'FeatPlus1Happiness' {
Show();
Title(ID_FEAT_ACCOMPISHED_TITLE);
Text(ID_FEAT_PLUS1_HAPPINESS);
}
messagebox 'FeatMinus1Happiness' {
Show();
Title(ID_FEAT_ACCOMPISHED_TITLE);
Text(ID_FEAT_MINUS1_HAPPINESS);
}
messagebox 'Feat10%MorePopsPerCity' {
Show();
Title(ID_FEAT_ACCOMPISHED_TITLE);
Text(ID_FEAT_10%_MORE_POPS_PER_CITY);
}
This should be the new feats for the feats.txt:
PHP:
FEAT_PLUS10%_PRODUCTION {
Duration 10
Description str_ldl_0
EffectIncreaseProduction 10
SlicMessage "FeatPlus10%Production"
}
FEAT_PLUS10%_COMMERCE {
Duration 10
Description str_ldl_0
EffectIncreaseCommerce 10
SlicMessage "FeatPlus10%Commerce"
}
FEAT_PLUS10%_SCIENCE {
Duration 10
Description str_ldl_0
EffectIncreaseScience 10
SlicMessage "FeatPlus10%Sience"
}
FEAT_PLUS1_HAPPINESS {
Duration 10
Description str_ldl_0
EffectIncreaseHappiness 1
SlicMessage "FeatPlus1Happiness"
}
FEAT_MINUS1_HAPPINESS {
Duration 5
Description str_ldl_0
EffectIncreaseHappiness -1
SlicMessage "FeatMinus1Happiness"
}
Note that this will only work if the AccomplishFeat event gives you more than once the same feat or the AddFeat function will do this job otherwise we have to find a work around for it. At least the 10 plus pop code will work, oh and of course so far the code is NOT tested therefore it can be still buggy and the strings for the new feat message boxes are missing.
And finnaly here are all the flags that can be used in the feats.txt.
-Martin
code:
Duration
Description
SlicMessage
SlicMessageValue
EffectBoatMovement
EffectBoatMovementValue
EffectCityDefenseBonus
EffectCityDefenseBonusValue
EffectReduceCityWalls
EffectReduceCityWallsValue
EffectIncreaseCityVision
EffectIncreaseCityVisionValue
EffectIncreaseProduction
EffectIncreaseProductionValue
EffectIncreaseCommerce
EffectIncreaseCommerceValue
EffectIncreaseHappiness
EffectIncreaseHappinessValue
EffectEliminateDistancePenalty
EffectEliminateDistancePenaltyValue
EffectIncreaseBoatVision
EffectIncreaseBoatVisionValue
EffectIncreaseScience
EffectIncreaseScienceValue
EffectGiveMaps
EffectIncreaseHitPoints
EffectIncreaseHitPointsValue
EffectScriptedTurn
EffectScriptedTurnValue
EffectScriptedCity
EffectScriptedCityValue
ExcludeAdvance
ExcludeWonder
ExcludeFeat
ExcludeFunction
ExcludeFunctionValue
CancelAdvance
CancelWonder
CancelFeat
CancelFunction
CancelFunctionValue
Building
BuildingValue
MinimumSizeOfCiv
MinimumSizeOfCivValue
PS: The slic file and the modified feats.txt is on the way to you Dave.
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:18. Apolyton Time is 00:18. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|