Jump to content


Photo

Ring Upgrade


  • Please log in to reply
8 replies to this topic

#1 Missile157

Missile157
  • Members
  • 25 posts

Posted 13 February 2013 - 04:19 PM

I was experimenting with RJs mod and noticed that certain heroes: Gandalf and Aragorn, could put on the ring and gain more power but be damaged over time.

I believe this could be a better solution to  having a Ring Hero who is the same as an already existing normal hero. 

Here is the code for Gandalf:

;-----------------------------------------------------------------------
	;---------------------------- Ring Code --------------------------------
	;-----------------------------------------------------------------------

	Behavior = ObjectCreationUpgrade ModuleTag_RemoveUpgrades1
		TriggeredBy				= Upgrade_HasRing
		RemoveUpgrade				= Upgrade_LostRing
	End

	Behavior = ObjectCreationUpgrade ModuleTag_RemoveUpgrades2a
		TriggeredBy				= Upgrade_LostRing
		RemoveUpgrade				= Upgrade_HasRing
	End

	Behavior = ObjectCreationUpgrade ModuleTag_RemoveUpgrades2b
		TriggeredBy				= Upgrade_LostRing
		RemoveUpgrade				= Upgrade_UseRing
	End

	Behavior = ObjectCreationUpgrade ModuleTag_RemoveUpgrades2c
		TriggeredBy				= Upgrade_LostRing
		RemoveUpgrade				= Upgrade_CorruptedRing
	End

	Behavior = ObjectCreationUpgrade ModuleTag_RemoveUpgrades3
		TriggeredBy				= Upgrade_UseRing
		RemoveUpgrade				= Upgrade_LostRing
	End

	Behavior = CommandSetUpgrade ModueTag_UpgradedRingCommandSet
		TriggeredBy				= Upgrade_HasRing
		CommandSet				= GandalfRingCommandSet
	End

	Behavior = CommandSetUpgrade ModueTag_RestoreNormalCommandSet
		TriggeredBy				= Upgrade_LostRing
		CommandSet				= GondorGandalfCommandSet
	End

	Behavior = ModelConditionUpgrade ModuleTag_TimerConditions
		TriggeredBy				= Upgrade_UseRing
		;RequiresAllTriggers			= Yes ;only use me if you have multiple required upgrades
		AddConditionFlags			= USER_10
		AddTempConditionFlag			= ModelConditionState:USER_11
		TempConditionTime			= 100.0
	End

	Behavior = ModelConditionUpgrade ModuleTag_RemoveTimerConditions
		TriggeredBy				= Upgrade_CorruptedRing
		RemoveConditionFlags			= USER_10
	End

	Behavior = FireWeaponUpdate ModuleTag_WeaponCorrupted
		FireWeaponNugget
			WeaponName			= GandalfCorruptionWeapon
			Offset				= X:0 Y:0 Z:0
			FireDelay			= 5000
			OneShot				= No
		End
	End

 

So is there a way to upgrade his model when he uses the Ring, so that he gains Galadriel's aura around him? This is Galadriel Aura code:

			ParticleSysBone = B_PELVIS GaladAura FollowBone:YES
			ParticleSysBone = B_PELVIS GaladAura02 FollowBone:YES

 

And also upgrade his weapon to the power of Sauron's Mace? I think I would be able to create this weapon I just wouldn't be sure on how to create an upgrade to make Gandalf use this weapon when he puts on the Ring.

 

EDIT:  Also, I was looking through commandset.ini with CTRL-F and couldn't find a commandset for Gandalf or Aragorn. Is it just a coincidence that these are the two characters who can put on the Ring? Does anyone know why their commandsets would be missing on RJs mod? I'm confused as I searched for the commandset named in the hero.ini file ("GondorGandalfCommandSet") and I even searched for just "Gandalf" and only something from the Arnor faction came up. What's even more confusing is that these characters still work in game so I couldn't have deleted these by accident. 


Edited by Missile157, 13 February 2013 - 06:21 PM.


#2 Missile157

Missile157
  • Members
  • 25 posts

Posted 19 February 2013 - 11:18 AM

OK it's been a while but I have tried something else.

I added this to the Ring Code in a hope that it would work, even though I'm not entirely sure what "ModuleTag" is.

 

Behavior = ModelConditionUpgrade ModuleTag_GaladAura
		TriggeredBy			        =Upgrade_UseRing
		ParticleSysBone = B_PELVIS GaladAura FollowBone:YES
End

 

I made up the module tag and it didn't seem to have a problem with that, but it says that "ParticleSysBone" was an unknown field, even though this exact code is used to give the normal GaladrielRingHero her Aura. Although it is used as a default model condition state there. So what is wrong with what I have done?

 

Thanks in advance if you can help. :)


Edited by Missile157, 19 February 2013 - 11:20 AM.


#3 Lauri

Lauri

    Old man Lauri

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

Posted 19 February 2013 - 07:45 PM

ParticleSysBone does not belong in a ModelConditionUpgrade. You'll have to make it use another modelcondition, which in turn has the ParticleSysBone you want. So you'll need to add both. For example:

 

        ModelConditionState USER_1
            Model               = GUFountain_SKN
            Skeleton            = GUTowerGrd_SKL
            ParticleSysBone = B_PELVIS GaladAura FollowBone:YES
        End
 

(of course, you'll have to use the Model\Skeleton the unit acctually use)

    Behavior = ModelConditionUpgrade ModuleTag_GaladAura
        TriggeredBy = Upgrade_UseRing
        AddConditionFlags = USER_1
    End
 

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#4 Missile157

Missile157
  • Members
  • 25 posts

Posted 19 February 2013 - 09:39 PM

Thanks for your help but for some reason, it doesn't seem to like the ModelConditionState and says it's an unknown field with the usual error message. It accepts the behaviour part but not the actual modelcondition.

 

Here's what I added:

	Behavior = ModelConditionUpgrade ModuleTag_GaladAura
        	TriggeredBy = Upgrade_UseRing
        	AddConditionFlags = USER_4
    	End

 

This seems fine.

Error is in the below part.

	ModelConditionState 	= USER_4
            Model               = GUGandalf_SKN
	    Skeleton            = GUGandalfG_SKL
            ParticleSysBone = B_PELVIS GaladAura FollowBone:YES
        End	

 

 

I have tried with different numbers for the "USER_X" in both pieces of code (corresponding obviously) and with and without the skeleton and the = between "ModelConditionState" and "USER_X"; the game doesn't work no matter what. :(

Thanks for the help though, any further ideas?



#5 Lauri

Lauri

    Old man Lauri

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

Posted 20 February 2013 - 12:38 AM

Did you put it the correct place?

As in, near the top of the code?


T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#6 Missile157

Missile157
  • Members
  • 25 posts

Posted 20 February 2013 - 12:59 PM

OK I have put it in the correct place and the effect now works, unfortunately Gandalf doesn't seem to have any animations anymore, he just slides across the ground like a moving statue. He can still attacks and the enemies die, but he doesn't move. 

 

Any ideas? Could the new particle system be messing it up, or the fact that I have to specify a model. I have tried several different models with corresponding skeletons, the result is the same.

 

 

 

EDIT: Just another quick question, but can the above steps be modified so that they change Gandalf's weapon instead of a graphical effect, because what I'm trying isn't working at the moment. This is the weaponset part:

	WeaponSet
		Conditions				= WEAPONSET_RING_MODE 
		Weapon					= PRIMARY GaladrielSword
	End 

And this is the condition part:

	Behavior = WeaponSetUpgrade ModuleTag_RingWeapon
        	TriggeredBy = Upgrade_UseRing
        	AddConditionFlags = WEAPONSET_RING_MODE
    	End

 

The error message says that "WEAPONSET_RING_MODE" isn't a valid member of the index list, does that mean it needs to be referenced in a different file? If so, where? If not, what is the problem?  I have also tried it with USER_4 and the result is the same.

Thanks again. :)


Edited by Missile157, 21 February 2013 - 11:27 AM.


#7 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 22 February 2013 - 08:36 PM

I dont believe WEAPONSET_RING_MODE is a valid condition flag... use WEAPONSET_CREATE_A_HERO_WS_01 instead :)

You cant create your own condition flags, there are a bunch of predefined ones, which I will be putting up in the near future for everyone to use as a reference when doing things like this :)

 

If you modelconditionstate has a Skeleton = ?? parameter then remove it, if it does not, then add it with the correct skeleton, this might solve the anims problem.


Ridder Geel

#8 Missile157

Missile157
  • Members
  • 25 posts

Posted 23 February 2013 - 10:03 AM

OK I have deleted the skeleton part of the ParticleSystem and that now works fine, thanks. :)

 

There is still the same error with the weaponset, it says AddConditionFlags is an unknown field. So, is there a particular place in the INI, in which this weaponset upgrade must go? As this was the problem earlier. At the moment the actual Weaponset is under the standard weaponsets and the WeaponSetUpgrade is right at the bottom with the rest of the Ring Code (see above).

 

Here's the new weaponset upgrade (I made sure that I changed the weaponset to correspond with the new condition too): 

Behavior = WeaponSetUpgrade ModuleTag_RingWeapon
        TriggeredBy = Upgrade_UseRing
        AddConditionFlags = WEAPONSET_CREATE_A_HERO_WS_01 
End


#9 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 23 February 2013 - 10:53 AM

Behavior = WeaponSetUpgrade Create_A_Hero_HOTWCGBasicWeaponset
    TriggeredBy               = Upgrade_UseRing
    WeaponCondition           = WEAPONSET_CREATE_A_HERO_WS_01
End

 

:) (sorry i wasn't aware at that exact moment that that piece of code you posted was also incorrect on the parameter and not only the value you put in) :xd:


Edited by Ridder Geel, 23 February 2013 - 10:54 AM.

Ridder Geel




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users