Jump to content


Photo

Summoning? Leveling? Toggling? AAAAAAAAAAA!


  • Please log in to reply
13 replies to this topic

#1 Lord of Nazgul95

Lord of Nazgul95
  • New Members
  • 47 posts

Posted 21 December 2006 - 04:27 AM

I am having troubles with my mod. I also have a question that would help make my mod way neater.

That question is:
How do you make it so, let's say, Dunedain Rangers get to TOGGLE between their swords and bows instead of just close/long range?

Also, I'd like to know if anyone knows how to give new units the ability to level up... I can't get my new units to level up! I know there's something somewhere, I just can't find it.

I have one more question: I have made Morgoth a playable unit in my mod. He is a summoned unit that takes the place of Rain of Fire for Mordor. I'd like to know how to get him to actually summon when I tell him to. When I buy the power for him, and use it, nothing happens. This was the same for 3 other powers I made. The powers are:
1. Return of Morgoth (Spell Power, 25) (summons Morgoth, hero stronger than Sauron)
2. Ranger Ambush (Faramir's new ability) (summons 3 Ithilien Rangers)
3. Osgiliath Veterans (Boromir's Level 10 ability) (summons 2 Soldier Battallions, 2 Archer Bat.s, and 2 Tower Guard Bat.s)
4. Prince of Dol Amroth (Imrahil's level 10 ability in my mod) (summons 3 Dol Amroth Knight Battallions (both new units))

If anyone knows how to fix these problems, please post! It would help... <:)

#2 Fingulfin

Fingulfin

    I Like Pi3. Do you?

  • Hosted
  • 1,752 posts
  • Location:California, USA
  • Projects:Staying Alive.
  •  This place looks familiar. I can't remember why.

Posted 21 December 2006 - 07:15 AM

#2: Experiencelevels.ini. Just add the name of your unit to one of the #DEFINE s at the top. Its really that easy! If you want other things, like upgrades to activate powers, you will need to study the INI a bit more.
Posted Image
--------------------------------------
"You look like a ghost of your former self..."

#3 IthronAiwendil

IthronAiwendil

    Retired modder

  • Hosted
  • 1,452 posts
  • Location:Finland
  • Projects:None
  •  Coder, skinner, modeler, art guy

Posted 21 December 2006 - 12:28 PM

You can copy/paste the experiencelevel code from an existing hero, and then replace the object names and such, like this:

BEFORE
[codebox]
;----------- MOUTH OF SAURON ------------------
ExperienceLevel MouthOfSauronLevel1
TargetNames = MordorMouthOfSauron MordorMouthOfSauronCalvalry
RequiredExperience = 1
ExperienceAward = MOUTH_OF_SAURON_LVL1_EXP_AWARD
Rank = 1
; Upgrades =
; AttributeModifiers =
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End

ExperienceLevel MouthOfSauronLevel2
TargetNames = MordorMouthOfSauron MordorMouthOfSauronCalvalry
RequiredExperience = MOUTH_OF_SAURON_LVL2_EXP_NEEDED
ExperienceAward = MOUTH_OF_SAURON_LVL2_EXP_AWARD
Rank = 2
; Upgrades =
AttributeModifiers = HeroLevelUpDamage1
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_good
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End
[/codebox]

AFTER
[codebox]
;----------- SHAGRAT ------------------
ExperienceLevel ShagratLevel1
TargetNames = MordorShagrat
RequiredExperience = 1
ExperienceAward = MOUTH_OF_SAURON_LVL1_EXP_AWARD
Rank = 1
; Upgrades =
; AttributeModifiers =
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End

ExperienceLevel ShagratLevel2
TargetNames = MordorShagrat
RequiredExperience = MOUTH_OF_SAURON_LVL2_EXP_NEEDED
ExperienceAward = MOUTH_OF_SAURON_LVL2_EXP_AWARD
Rank = 2
; Upgrades =
AttributeModifiers = HeroLevelUpDamage1
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_good
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End
[/codebox]

Remember to put in all the levels 1-10 and also include the upgrade your hero needs. If you want experiencelevels for new units, use Fin's method.

#4 Lord of Nazgul95

Lord of Nazgul95
  • New Members
  • 47 posts

Posted 21 December 2006 - 03:25 PM

NONONONONO! I mean UNITS! my heroes all work fine, I know how to give them powers at certain levels and everything!

I just need the powers fixed and to find a way for Imrahil to have a working Captain of Gondor ability, which it seems I'll have to make a new one just for him... :( .....

Can you please answer my other questions? They are ten times more important!

#5 IthronAiwendil

IthronAiwendil

    Retired modder

  • Hosted
  • 1,452 posts
  • Location:Finland
  • Projects:None
  •  Coder, skinner, modeler, art guy

Posted 21 December 2006 - 05:50 PM

NONONONONO! I mean UNITS! my heroes all work fine, I know how to give them powers at certain levels and everything!

I just need the powers fixed and to find a way for Imrahil to have a working Captain of Gondor ability, which it seems I'll have to make a new one just for him... :( .....

Can you please answer my other questions? They are ten times more important!

It would be easier to help if you posted the codes that you're not getting working. Hope you get your problems fixed...

#6 Ereinion2

Ereinion2
  • Members
  • 30 posts

Posted 21 December 2006 - 10:43 PM

To give units the ability to level up, you have to do it differently than for heroes. Go to experiencelevels.ini and find this part, at the top.

#define GOOD_ELITE  ElvenMirkwoodArcher ElvenMirkwoodArcherHorde ElvenMirkwoodArcherBanner GondorRanger GondorRangerHorde GondorRangerInn GondorRangerInnHorde RohanElvenWarrior RohanElvenWarriorHorde;;DwarvenMenOfDale DwarvenMenOfDaleHorde DwarvenMenOfDaleHordeInn 

#define GOOD_TROOPS GondorTowerShieldGuard GondorTowerShieldGuardHorde GondorTowerShieldGuardHordePorcupine GondorInfantryBanner ElvenMithlondSentry ElvenMithlondSentryHorde ElvenBanner ElvenLorienWarrior ElvenLorienWarriorHorde ElvenLorienArcher ElvenLorienArcherHorde RohanHobbit RohanArcher RohanArcherHorde RohanArcherHordeSkirmishFormation RohanPeasant RohanPeasant1 RohanPeasant2 RohanPeasant3 RohanPeasant4 RohanPeasantHorde GondorFighter GondorFighterHorde GondorFighterHordeBlock GondorArcher GondorArcherHorde RohanBanner DwarvenGuardian DwarvenGuardianHorde DwarvenBanner DwarvenAxeThrower DwarvenAxeThrowerHorde DwarvenPhalanx DwarvenPhalanxHorde

#define GOOD_CAVALRY RohanRohirrim RohanRohirrimHorde RohanRohirrimArcher RohanRohirrimArcherHorde RohanRohirrimArcherHordeWedgeFormation GondorCavalry GondorCavalryBanner GondorKnightHorde;;ElvenRivendellLancer ElvenRivendellLancerHorde ElvenRivendellLancerBanner 

#define GOOD_FARM GondorFarm GondorFarmMultiplayer

#define GOOD_PORTERS DwarvenPorter MenPorter ElvenPorter

Now just add your unit's designation into the category where it should go. For example, for your Knights of Dol Amroth, add it to the GOOD_CAVALRY section, like this.


#define GOOD_CAVALRY RohanRohirrim RohanRohirrimHorde RohanRohirrimArcher RohanRohirrimArcherHorde RohanRohirrimArcherHordeWedgeFormation GondorCavalry GondorCavalryBanner GondorKnightHorde;;ElvenRivendellLancer ElvenRivendellLancerHorde ElvenRivendellLancerBanner GondorKnightofDolAmroth


That should let your units get levels up. That's what Fin was saying. ;)

As for the weapons on your rangers, you'll probably have to remove the parameter that makes them switch weapons at close range; I think it's this part.


	Behavior = DualWeaponBehavior ModuleTag_13
		SwitchWeaponOnCloseRangeDistance = 24
	End

Now just give them a new weaponset toggle, and it should work. If you're not sure how to do that, try looking at Faramir's coding that allows him to switch weapons. Then create a commandbutton, or use an existing one, and add it to the commandset for the rangers.

Happy modding! <^_^

Edited by Ereinion2, 21 December 2006 - 10:44 PM.


#7 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,436 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 21 December 2006 - 11:22 PM

I'm pretty sure that the toggle thing is alot more complicated ;) not sure though, it's BFME2 <^_^ you never know!

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#8 Fingulfin

Fingulfin

    I Like Pi3. Do you?

  • Hosted
  • 1,752 posts
  • Location:California, USA
  • Projects:Staying Alive.
  •  This place looks familiar. I can't remember why.

Posted 21 December 2006 - 11:34 PM

No, its really that simple. It only takes around 5 minutes to do, once you know what you have to change.
Posted Image
--------------------------------------
"You look like a ghost of your former self..."

#9 Lord of Nazgul95

Lord of Nazgul95
  • New Members
  • 47 posts

Posted 22 December 2006 - 01:36 AM

Um, I have to say that the most important thing is the summon powers. Do I have to make an egg for them, or have I just coded it wrong. I do know that I have no errors, it is just that these things don't work the way I want them to. Like with the ranger power, when I summon the rangers, nothing happens. The little terrain change and sound comes in, then it does NOTHING. It counts as used, too!

Oh, and about the ranger's toggle, I have editted the following things:
  • CommandButton.ini (Where I added a new command to give Rangers toggle)
  • CommandSet.ini (Where I added the button to the Ranger commandset)
  • Object\GoodFaction\Units\Men\Faramir.ini (where I only stole some info...)
  • Object\GoodFaction\Units\Men\GondorRanger.ini (where I took out the behaviour you guys told me to and added Faramir's toggle weapon (with "RangerSword" instead of "Faramir Sword"
With what I have, when I toggle with the rangers they stand still until the enemy has come up to the rangers, then they attack (and suffer). I have an idea, though, which is this: I will try to find a way to make it look like they don't hold bows anymore, like, so they put them away and draw their swords. I know I'd need to animate that, but if I am wrong and it can be done through coding (like maybe stopping one animation halfway through) I'd do it!

Edited by Lord of Nazgul95, 22 December 2006 - 03:42 AM.


#10 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 23 December 2006 - 06:48 AM

For summonig the rangers, did you make an OCL (object creation list) for them? Post what you got and we can help you out more on this.

signature_group1.gif

 

16821.png


#11 Hard_Sander

Hard_Sander
  • Members
  • 244 posts

Posted 23 December 2006 - 02:15 PM

Didn't someone already have a topic about the ranger toggle between sword and bow?

Edit: mmh, all I found was:

http://forums.revora...l=ranger toggle
http://forums.revora...p...toggle&st=0

And here a mod for it:

http://forums.revora...topic=34733&hl=

Edited by Hard_Sander, 23 December 2006 - 02:25 PM.


#12 Lord of Nazgul95

Lord of Nazgul95
  • New Members
  • 47 posts

Posted 24 December 2006 - 06:32 AM

So, with the ranger toggle, I have everything ALMOST working. I just need to learn how to get it so that when the rangers use toggle ability (which works perfectly), they will chase the enemy instead of waiting for the enemy to get within range. Is it something to do with behaviours? How do I get them to toggle range as well as weapon?

When I get this figured out, all I'll have to do is bind Faramir's skeleton to the ranger model, and copy Faramir's animations into rangeranims.ini or whatever it's called, I forget. Its really late right now (well, actually, it's only 11 PM, I am just exhausted from traveling home from a trip).

Anyway, for now, all I care about is getting the rangers to use their rangefinder. Once I figure out THAT, I can finish this. Please, someone help me find the part of the code in either the Weapon.ini or GondorRanger.ini, or wherever it is! I want this to work!

And as for the other stuff, maybe when I port this mod to ROTWK I will get it to work. BTW, I can't remeber if I said this yet, but the mod is called:

The Wars of the Third Age, a BFME2 Mod (stb ported to ROTWK)

I'm sorry, but I forgot; what does "FTW" mean?

#13 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 24 December 2006 - 07:06 AM

Is this what you are looking for?

Weapon GondorRangerMissileHordeRangefinder
	AttackRange			= #SUBTRACT( GONDOR_RANGER_RANGE 125 )  ;;100
	
	RangeBonusMinHeight		= 10
	RangeBonus			= 1
	RangeBonusPerFoot		= 1;;#MULTIPLY( GONDOR_RANGER_RANGE .01 ); attempting to match the % vision increase on the units vision range. 
	
	DelayBetweenShots		= 1000
	LeechRangeWeapon		= Yes
	AcceptableAimDelta		= 45
	AntiAirborneVehicle		= Yes
	AntiAirborneMonster		= Yes
	CanFireWhileMoving		= Yes	; When aboard a ship.
	FinishAttackOnceStarted 	= No
	HordeAttackNugget
	End
End

I think all you have to do is make a new one for your ranger sword and put it in the weaponset for the Gondor Ranger Horde.

signature_group1.gif

 

16821.png


#14 Lord of Nazgul95

Lord of Nazgul95
  • New Members
  • 47 posts

Posted 25 December 2006 - 11:16 AM

I'm not sure what you mean, maybe I'll search a bit more. But I think the rangefinder tool may work!

_-=<EDIT>=-_
THANKYOU, I think that is it EXACTLY! I went into the Rohirrim horde's part of MenHordes.ini and found something called "GoodMeleeHordeRangefinder" and when I made a second weapon with the TOGGLE_WEAPON_1 condition (in the GondorRangerHorde part), put that in, and I bet that when I try it again it will work! BTW, I'm porting this mod to ROTWK, though I think it'll take a very long time to remeber and find all of the stuff. I guess it will help if I look at the lotr.str file when I am searching for the units I have added.

Edited by Lord of Nazgul95, 15 January 2007 - 01:54 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users