Jump to content


Photo

1 Hero


  • Please log in to reply
11 replies to this topic

#1 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 22 July 2011 - 03:02 PM

I made hero X recruitable from a different building and when i build him he comes out just fine. but i can keep recruiting him so instead of just 1 hero i could get like 50. i was wondering how i can make it so only 1 is recruitable per player but can be bought again if he dies from the same building not from the fort. (X is an existing hero that i am editing.)

#2 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 22 July 2011 - 03:09 PM

You can make it so only one of that type of 'unit' can be made. But if he dies, you'll be making a new hero so he would start back at level 1 every time. It's not possible (that I'm aware of) to have proper hero spawning in any building other than a citadel/fortress.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#3 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 22 July 2011 - 03:40 PM

Its possible just no waypoint so it starts in the middle of the building instead of walking out the entrance but instead walks through its walls but its ok for now.


I know that when he dies he starts at level 1. i just haven't seen any tutorials on how to exactly do it. which is what i am asking how to do. So, he starts at level 1 and has a potential to get to level 10 but if he dies starts at level 1 again.

so how do i start making him so its a new hero each time like you said?

Edited by Dragon Rider, 22 July 2011 - 03:42 PM.


#4 Mr_Troy

Mr_Troy
  • New Members
  • 2 posts

Posted 22 July 2011 - 04:19 PM

Its possible just no waypoint so it starts in the middle of the building instead of walking out the entrance but instead walks through its walls but its ok for now.


I know that when he dies he starts at level 1. i just haven't seen any tutorials on how to exactly do it. which is what i am asking how to do. So, he starts at level 1 and has a potential to get to level 10 but if he dies starts at level 1 again.

so how do i start making him so its a new hero each time like you said?

Inside the object's code : (This should work in Rise of The Witch King, idk about BFME2)
MaxSimultaneousOfType = 1

And delete the object's revive behavior (if it has it) (Behavior = RespawnUpdate)
to make sure you can't revive the hero everytime it dies.

Edited by Mr_Troy, 22 July 2011 - 04:22 PM.


#5 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 July 2011 - 10:53 PM

Look at treebeard from the elves...? Is that an idea perhaps? seeing as he comes from that ent circle thing and is a hero :p
Ridder Geel

#6 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 22 July 2011 - 11:02 PM

Thanks Ridder Geel ill take a look and get back to you on how it works. i didnt even think of the ent because i never use them lol Posted Image

Edit:

Ok, i have taken a good look at his death behaviours and i saw an eva event for when he dies it complete but i dont understand which part of the code i need...

Edited by Dragon Rider, 22 July 2011 - 11:10 PM.


#7 fienx001

fienx001
  • Members
  • 118 posts
  • Location:Pacific Northwest
  • Projects:The Door of Night | Fienx Mod
  •  Getting There

Posted 23 July 2011 - 03:53 AM

If you're still having respawn issues, this is how you do it with someone like Shelob. You dont have to mess with the eva events if this is just the ini

For one unit only...

; ***DESIGN parameters ***
Side = Wild
EditorSorting = UNIT
ThreatLevel = SHELOB_THREAT_LEVEL
ThingClass = MEDIUM_MONSTER

MaxSimultaneousOfType = 1

TransportSlotCount = TRANSPORTSLOTCOUNT_MONSTER
WeaponSet
Conditions = None
Weapon = PRIMARY ShelobMandibles
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI

End

Give him an Active body module...

Body = ActiveBody ModuleTag_Body
MaxHealth = 10000
End


And comment out all the respawn rules...

; Body = RespawnBody ModuleTag_RespawnBody
; MaxHealth = 10000 ;;;WILD_SHELOB_HEALTH ;BALANCE Shelob Health
; PermanentlyKilledByFilter = NONE ;Who kills me permanently?
; End
; Behavior = RespawnUpdate ModuleTag_RespawnUpdate
; DeathAnim = STUNNED ;Model condition to play when killed-to-respawn
; DeathFX = FX_ShelobDieToRespawn ;FXList to play when killed-to-respawn
; DeathAnimationTime = 1133 ;How long DeathAnim will take.
;
; RespawnAnim = SELECTED ;Animation to play when respawning.
; RespawnFX = FX_Resurrection ;FXList to play when respawning.
; RespawnAnimationTime = 2000 ;Time it takes for respawn to play.
; AutoRespawnAtObjectFilter = CASTLE_KEEP
; ButtonImage = HIShelob_res
;
; ;RespawnEntries determine the ruleset for how a character can be revived. Some units may automatically respawn, others
; ;may require a specific revive action performed on him. You can specify different values for each level... or use Level:Any
; RespawnRules = AutoSpawn:Yes Cost:1500 Time:90000 Health:100% ;DEFAULT VALUES
;
; End
Posted Image

#8 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 24 July 2011 - 05:29 PM

Take a look at my mod before you read this next post:

I set my money in game to 21000 and i bought my hero building for 5000, it builds then i buy aragorn for another 5000 and he comes out and everything works but i still have 5000 but it wont let me buy a second one. Now then when i do the elven version of the building and build legolas or elrond i can buy doubles of them and triples anyone know why i can only get one aragorn but multiple elronds and legolas?

#9 Spartan184

Spartan184

    :)

  • Project Team
  • 1,592 posts
  • Location:Moon
  • Projects:Random Modding Projects
  •  Coder, Map.ini Coder, Mapper, and Beta Tester

Posted 24 July 2011 - 06:21 PM

Did you change the "MaxSimultaneousOfType = 1"?


 

safsignature.png

 


#10 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 28 July 2011 - 01:29 AM

i didn't do a thing to the code lol its like its already in elronds ini but idk where.

#11 EggyDan

EggyDan

    Eodynn

  • Members
  • 182 posts
  • Location:UK

Posted 02 August 2011 - 11:58 AM

Hey all,

Just had an interesting thought while reading this topic. In regards to allowing a hero to level up and 'revive' from a non-fortress building, I have a couple of ideas, just some food for thought.

Retaining levels:

On each level up of the hero, a Player upgrade is permanently granted, either directly through experiences levels if it works, or if not then indirectly through some fake 'special ability'.

The building the hero comes from has either multiple commandsets switched by the player upgrade, or some other system. However the Mumakil Pen creates rank 2 Mumakil later on basically, however that works, can't remember :p
The point here is that the Player upgrades granted by the levelling of the hero switch the commandset of the building(s) that produce the hero. Thus, the levels of the hero are retained! (Not the exact amount of experience though but that's pretty minor really)

Reviving:

The aim here is really just to change the icon/text of the 'Recruit' button to a 'Revive' button, mimicing the real one, and, depending on the modder's preference, hiding the button altogether while the hero is alive.

To achieve this, the hero has an attribute modifier that grants a non-permanent Player upgrade. This in essence just tells us that the hero is alive. This upgrade can then be used in the same principle as before to alter commandsets, or it could be used in a 'Toggling Commandbutton' kind of way if possible.


So, just ideas here, I really hope someone tries this out! (I don't really have the time right now)

#12 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 04 August 2011 - 09:32 PM

Hey all,

Just had an interesting thought while reading this topic. In regards to allowing a hero to level up and 'revive' from a non-fortress building, I have a couple of ideas, just some food for thought.

Retaining levels:

On each level up of the hero, a Player upgrade is permanently granted, either directly through experiences levels if it works, or if not then indirectly through some fake 'special ability'.

The building the hero comes from has either multiple commandsets switched by the player upgrade, or some other system. However the Mumakil Pen creates rank 2 Mumakil later on basically, however that works, can't remember :p
The point here is that the Player upgrades granted by the levelling of the hero switch the commandset of the building(s) that produce the hero. Thus, the levels of the hero are retained! (Not the exact amount of experience though but that's pretty minor really)


Ah... that should solve the problem I am having with Cirdan in TEA:CE. A long time ago, I tried to grant level upgrades through the actual hero unit. That didn't work though. Using a building though and changing it's commandset should do the trick. :good:

signature_group1.gif

 

16821.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users