Jump to content


oblivionator

Member Since 03 Jun 2009
Offline Last Active Private

Topics I've Started

AI heroes retreating back to fortress

29 November 2009 - 06:10 AM

Hello, I'm back with a new, personal modding question. :p For a while now, I've been trying to make the heroes controlled by the AI to retreat back to their fortress when damaged, very much in a similar manner to the SEE mod. When a hero is badly damaged, an invisible One-Ring-like object is spawned over them, causing them to go and give this object to the fortress. This is really to buy the hero some time to heal. A neat way to use (or misuse...hehe) codes. :p So I've been closely following SEE's codes to see how they did it, and so far I've gotten a hero to retreat back to the fortress and deliver the invisible object, but when they do, it's like they get the One Ring upgrade and have that halo of words above their fortress. :) What I'm trying to do now is make the fortress not receive the One Ring upgrade when the AI-controlled hero delivers the object, but don't have a clue how to do it. What would need to be done? Thank you in advance for any of your help.

Edit: Yes. I managed to figure it out in 17 steps.

AI Hero Recruiting

11 November 2009 - 06:54 PM

Hello, I have a couple of questions on how to make the AI recruit heroes more early, like hobbit heroes coming out really early in the game. I noticed that the AI will only start recruiting heroes in the second and third phases. I would also like to try and make the AI revive heroes right after they die, returning as a different object, like a Nazgul first being recruited on horse, then once killed, comes back on a fellbeast. The AI will recruit the Nazgul for the first time on horse, but then I never seen them revive the Nazgul with their fellbeast. I think it would have something to do with Mordor's hero build order in skirmishdata INI. Once the Nazgul are removed from Mordor's hero list from both the skirmishaidata and playertemplate INI and the heroes that are left are the Witch-king, Mouth of Sauron, and Gothmog, they continue to revive them as the battle progresses. But once the Nazgul are added into the hero list again, the AI will stop recruiting and reviving their heroes after awhile, probably because the Nazgul revive as different objects. I added their revive-with-fellbeast forms into the hero build order list, but the AI still won't recruit them.

So my question is: Would there be some sort of code or script that could make the AI recruit certain heroes more early in-game, and make them revive certain heroes the moment they die (like the Nazgul)? Any help would be appreciated. :xd:

Can't get summoned battalions to start at lvl 5?

02 September 2009 - 03:43 AM

Hey, I've been having some trouble with getting summoned battalions to start at a higher level, like level 5 or so. I've been following King Dain's royal guard summon, and have gotten the battalions to receive all their upgrades (banner carriers, forged blades, heavy armor), when summoned, but they only start at level 1. The banner carrier doesn't show up either, even though it says the battalion has all upgrades.
Posted Image
This is from the RJ mod btw. Here are the codes I altered:
elvenhordes INI:
CODE
ChildObject ElvenMirkwoodSpearmenHorde_Summoned ElvenMirkwoodSpearmenHorde
IsTrainable = No
CommandPoints = 0
CommandSet = GondorTowerShieldGuardCommandSet_Summoned
EquivalentTo = ElvenMirkwoodSpearmenHorde

KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE ARMY_SUMMARY MELEE_HORDE LARGE_RECTANGLE_PATHFIND PIKE

Behavior = ExperienceLevelCreate ModuleTag_MPLevelBonus
LevelToGrant = 5
MPOnly = No
End
Behavior = HordeContain ModuleTag_HordeContain
FrontAngle = 270
FlankedDelay = 2000
ObjectStatusOfContained =
InitialPayload = ElvenMirkwoodSpearmen_Summoned 6
Slots = 6
PassengerFilter = NONE +INFANTRY
ShowPips = No
ThisFormationIsTheMainFormation = Yes ;Used to determine which armorset to use (and anything else we want!)
RandomOffset = X:0 Y:0

MeleeBehavior = Amoeba
FacingBonus = 30.0
AngleLimitCos = -0.17
InnerRange = 30
OuterRange = 80
OuterRangeBuildings = 140
End

; Banner Carrier info
BannerCarriersAllowed = ElvenMirkwoodArcherBanner_Summoned
BannerCarrierPosition = UnitType:ElvenMirkwoodSpearmen_Summoned Pos:X:46.0 Y:0.0

RankInfo = RankNumber:1 UnitType:ElvenMirkwoodSpearmen_Summoned Position:x:30 Y:10 Position:X:30 Y:-10 Position:X:30 Y:30 Position:X:30 Y:-30 Position:X:30 Y:50 Position:X:30 Y:-50

RanksToReleaseWhenAttacking = 1

MeleeAttackLeashDistance = 1 ; How far the hordes can move from the center of the horde when melee attacking.
BackUpMinDelayTime = 1 ; The minimum amount of time to delay before backing up
BackUpMaxDelayTime = 3000 ; The maximum amount of time to delay before backing up
BackUpMinDistance = 1 ; The minimum number of cells to backup
BackUpMaxDistance = 3 ; The maximum number of cells to backup
BackupPercentage = 80% ; The amount of chance that a unit will back up.

AlternateFormation = ElvenMirkwoodSpearmenHordePorcupine_Summoned
End

Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
MinLifetime = RJ_GONDOR_GREY_COMPANY_LIFETIME
MaxLifetime = RJ_GONDOR_GREY_COMPANY_LIFETIME
DeathType = FADED
End
End
elvenmirkwoodspearmen INI:
ChildObject ElvenMirkwoodSpearmen_1_Summoned ElvenMirkwoodSpearmen_1

	IsTrainable = No
	CommandPoints = 0
	EquivalentTo = ElvenMirkwoodSpearmen_1

	KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE THROWN_OBJECT GRAB_AND_DROP ATTACK_NEEDS_LINE_OF_SIGHT SUMMONED

	Behavior = GrantUpgradeCreate ModuleTag_GrantForgedBlades
		UpgradeToGrant = Upgrade_ElvenForgedBlades
	End
	Behavior = GrantUpgradeCreate ModuleTag_GrantHeavyArmor
		UpgradeToGrant = Upgrade_ElvenHeavyArmor
	End
	Behavior = GrantUpgradeCreate ModuleTag_GrantBasicTraining
		UpgradeToGrant = Upgrade_ElvenBasicTraining
	End

	Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
; This one does the work, but the one in the horde displays the timer
		MinLifetime		= RJ_GONDOR_GREY_COMPANY_LIFETIME
		MaxLifetime		= RJ_GONDOR_GREY_COMPANY_LIFETIME
		DeathType		= FADED
	End

End
elvenmirkwoodarcherbanner INI:
;--------------------------------

ChildObject ElvenMirkwoodArcherBanner_Summoned ElvenMirkwoodArcherBanner
	IsTrainable = No
	CommandPoints = 0
	EquivalentTo = ElvenMirkwoodArcherBanner
	
	Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
		MinLifetime		= RJ_GONDOR_GREY_COMPANY_LIFETIME
		MaxLifetime		= RJ_GONDOR_GREY_COMPANY_LIFETIME
		DeathType		= FADED
	End
End
Following King Dain's royal guard summon, I'm trying to get the banner carrier to appear and make the battalions start at level 5, but can't. Am I missing something? Thanks for any solutions or tips that you may provide! ;)
Edit: Sorry this is all sprawled out across the page. :w00t:

Making RJ-RotWK 1.06 units/structures appear in WB

22 August 2009 - 12:54 AM

Hi, I'm trying to make myself a WB that will have the modded units/structures of RJ-RotWK 1.06 in the object selection panel, so I can make some maps, AI bases, etc... with them. Here's what I tried doing to get it to work:

1. I open up FinalBIG and go to the RJ_RotWK_1_06 folder. I click and drag the art, bases, data, libraries, and maps folder into FinalBIG.
2. I save the FinalBIG document as "_RJ_RotWK" and put it into "C:\Program Files\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king."
3. I close FinalBIG and open it again, bringing out the "_RJ_RotWK" FinalBIG document. I delete "data\ini\object\gamedata.ini" from the list.
4. I add it to the list again, this time under the filename, "data\ini\gamedata.ini." I click Yes to overwrite.
5. I add the line --) #includes "_gamedata.inc" <-- at the top of the INI. I tried doing this once in the INI, and once in FinalBIG.
6. I save again and try to open Worldbuilder to see if the modded units/structures will be there.

But Worldbuilder doesn't wanna load. :shiftee2: the loading screen just disappears after being 5-10% complete. It will load again, once I delete the "_RJ_RotWK" FinalBIG document I made in "C:\Program Files\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king." Does anybody know what else needs to be done or what the problem is? I'd appreciate any help. :p

Making Create a Heroes Receive Knockback

15 August 2009 - 01:15 AM

Hey, I have another 2 questions. :p I've been looking through a lot of INI files to try and find whatever I'm looking for. I want Create a Heroes to be able to receive knockback, just like all the normal heroes in RJ-RotWK. You know, like them getting hit by catapults and trolls and getting knocked back, instead of acting like nothing is hitting them. I'm trying to figure out how to make them have the same attribute modifiers as regular heroes when they level up also. An example being a lvl 1 regular hero and a lvl 1 createahero starting with 3000 HP, then finally when the regular hero reaches lvl 10, he has 4600 HP, but when the createahero reaches lvl 10, he has like 6200 HP. :) I can't seem to find the codes to change these things. I found the experiencelevels_createahero INI, whice had codes like:
CODE
;---------------------- CreateAHero ---------------------------------
ExperienceLevel CreateAHeroLevel1
TargetNames = CreateAHero
RequiredExperience = 1
ExperienceAward = RJ_CREATE_A_HERO_LVL1_EXP_AWARD
Rank = 1
; Upgrades = CreateAHero_Dummy_not_used_reset_in_code_at_runtime
SelectionDecal
Texture = decal_hero_good
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40 ;16
MaxRadius = 200 ;16
MaxSelectedUnits = 40 ;1
End
End

ExperienceLevel CreateAHeroLevel2
TargetNames = CreateAHero
RequiredExperience = RJ_CREATE_A_HERO_LVL2_EXP_NEEDED
ExperienceAward = RJ_CREATE_A_HERO_LVL2_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 2
AttributeModifiers = HeroLevelUpDamage1
; Upgrades = CreateAHero_Dummy_not_used_reset_in_code_at_runtime
SelectionDecal
Texture = decal_hero_good
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40 ;16
MaxRadius = 200 ;16
MaxSelectedUnits = 40 ;1
End
End

...and so on all the way to lvl 10, but I don't think this INI is really used; I deleted it and went ingame: the Create a Heroes still leveled up like they did even without this INI. Hmm...I'm not sure what to do. Any help pointing me in the right direction would be appreciated. :p