Jump to content


Photo

Ereinion2's questions


  • Please log in to reply
19 replies to this topic

#1 Ereinion2

Ereinion2
  • Members
  • 30 posts

Posted 19 December 2006 - 12:05 AM

Hi all!

I've got a problem with a hero I made. I created a new weapon for him, but it isn't working right. He does damage correctly, but he doesn't always hit unless the enemies are close to him. If he tries to attack enemies that are a bit farther away (such as pikemen), he goes through the animations and stuff, but for some reason doesn't deal any damage. It's like he's missing somehow, or else attacking beyond his weapon's range. Here's the code...


Weapon GilgaladSpear
	RadiusDamageAffects			= ENEMIES NEUTRALS NOT_SIMILAR
  LeechRangeWeapon	  = Yes
  AttackRange		   = 30.0
	CanFireWhileMoving			= No
  MeleeWeapon		   = Yes
  DelayBetweenShots	 = GILGALAD_DELAYBETWEENSHOTS
  PreAttackDelay		= GILGALAD_PREATTACKDELAY 
  PreAttackType		 = PER_SHOT 
  FireFX				= FX_GandalfSwordHit
  RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR
  FiringDuration		= GILGALAD_FIRINGDURATION 			
  DamageDealtAtSelfPosition	= Yes				

  DamageNugget						
	Damage		= 300					
	Radius		= 30.0
	DelayTime	 = 0
	DamageType	= HERO
	DamageFXType  = SWORD_SLASH
	DeathType	 = NORMAL
  End

  DamageNugget						
	Damage		= 200					
	Radius		= 30.0
	DelayTime	 = 0
	DamageType	= MAGIC
	DamageFXType  = MAGIC
	DamageScalar		  = 600% NONE +MordorSauron
	DeathType	 = NORMAL
  End
	MetaImpactNugget							
;		HeroResist			= .75
		ShockWaveAmount		= 20
		ShockWaveRadius		= 30
		ShockWaveArc		= 50				
		ShockWaveTaperOff	= 1.0
		ShockWaveSpeed		= 0.0
		ShockWaveZMult		= 1.6
	End
End


I've tried reducing the attack range to 20, but that didn't seem to help. Any ideas?

Edited by Ereinion2, 23 December 2006 - 12:07 AM.


#2 jimiojoe

jimiojoe

    War Mungerer

  • Project Team
  • 491 posts
  • Projects:X-Mod, The Harry Potter Modification
  •  Advice

Posted 19 December 2006 - 02:03 PM

well it isnt just you... this randomly happened with one of my units in my mod aswell, and i just havn#t got a clue why, every other weapon works fine its just that one acting weird, and same for yours by the looks....

an idea just came to mind....

ScatterRadius			= 0

try adding that in... that should make the weapon miss by nothing... i doubt that will be it, im gnna try it now bt...you never know it sjust a thhought...i'll keep checking this for the answer :thumbsupsmiley:

Soz i cudnt help

Jimiojoe
(Leader of X-Mod)
www.freewebs.com/jimiojoe
Jimiojoe
A light from the shadow shall spring.

#3 Ereinion2

Ereinion2
  • Members
  • 30 posts

Posted 19 December 2006 - 04:09 PM

Thanks, I'll try that. Hopefully you can get yours worked out too!

#4 Grim

Grim

    Mad Axe

  • Project Team
  • 537 posts
  •  T3A Team Chamber Member
  • Division:T3A Moderator

Posted 19 December 2006 - 04:19 PM

DamageDealtAtSelfPosition = Yes

This may mean the attack radius is dealt at the exact location of your hero. So when he tries to attack something at his weapon range = 30, in fact he deals damage around him at 30 radius, sometimes not reaching the target.

Try to remove that parameter, or to reduce his range or extend his damage radius.
Posted Image

#5 Ereinion2

Ereinion2
  • Members
  • 30 posts

Posted 19 December 2006 - 09:58 PM

Wow, it worked! I tested it, and it seems like it's fixed! Thanks, Grim. :thumbsupsmiley:



FYI, jimiojoe, here's what I did. I simply found this part of the code:

DamageDealtAtSelfPosition	= Yes   

and I removed it. It seems to have solved the problem, so it might solve your problem, too.

#6 Grim

Grim

    Mad Axe

  • Project Team
  • 537 posts
  •  T3A Team Chamber Member
  • Division:T3A Moderator

Posted 20 December 2006 - 02:07 PM

You're welcome :p

However, don't forget you are not forced to remove it, if you want the damage radius center to be at your hero's location, keep it, and raise the damage radius or lower the attack range.
Posted Image

#7 zimoo

zimoo

    Ecthelion of the Fountain

  • Project Team
  • 2,009 posts
  • Location:Devon, England
  • Projects:Lurking until the off topic begins...
  •  Guardian of the Books

Posted 20 December 2006 - 02:23 PM

:p Grim you rock! I've had this error for a few months with several of my heroes, and I had a few other coders look at it but to no avail. Many thanks :p
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image

Playing games? Ah, you'll never be a good modder if you get involved in actually playing them!


#8 jimiojoe

jimiojoe

    War Mungerer

  • Project Team
  • 491 posts
  • Projects:X-Mod, The Harry Potter Modification
  •  Advice

Posted 20 December 2006 - 05:46 PM

thankies lovely people!!!

Jimiojoe
(Leader Of X-Mod)
www.freewebs.com/jimiojoe
Jimiojoe
A light from the shadow shall spring.

#9 Ereinion2

Ereinion2
  • Members
  • 30 posts

Posted 21 December 2006 - 10:57 PM

Hey everybody!
Unfortunately, I've got another problem. <^_^ It's with the BFME2 lotr.str file and getting names and stuff to work ingame. I extracted the lotr.str file from the englishpatch_105 file and edited it, then placed it in the BFME2/data folder, but it didn't work. Next I tried removing all the english .big files that contained a version of the lotr.str file, but it still doesn't work, and now some of the original names aren't working either. What do I need to do?

#10 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:36 PM

How is it not working? All you have to do is add your strings at the bottom of the STR, and then add it to your .BIG with this path: "data\lotr.str". There shouldn't be any problems, its really easy to do <^_^
Posted Image
--------------------------------------
"You look like a ghost of your former self..."

#11 zimoo

zimoo

    Ecthelion of the Fountain

  • Project Team
  • 2,009 posts
  • Location:Devon, England
  • Projects:Lurking until the off topic begins...
  •  Guardian of the Books

Posted 22 December 2006 - 01:21 AM

I've heard numerous people say they have problems adding new strings when modding through the main directory.

Ereinion2, I suggest you switch to the -mod command <^_^
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image

Playing games? Ah, you'll never be a good modder if you get involved in actually playing them!


#12 Lauri

Lauri

    Old man Lauri

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

Posted 22 December 2006 - 11:12 AM

really, you don't need to add strings to the bottom.... I always have them on top, cause then it's much easier <^_^

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#13 jimiojoe

jimiojoe

    War Mungerer

  • Project Team
  • 491 posts
  • Projects:X-Mod, The Harry Potter Modification
  •  Advice

Posted 22 December 2006 - 01:38 PM

well i found itr tricky coz when extractin files when everywhere and i got confused but now i just have the lotr.str in the data folder like you said, and have moved all english and patches, - the most easy was is yes to do the -mod idea, but im silly and gnna have to sort that out at the end coz when i started my mod i cudnt do it....okay im a twat. but yeah, make sure you have no update.bigs and that should do it
Jimiojoe
A light from the shadow shall spring.

#14 Ereinion2

Ereinion2
  • Members
  • 30 posts

Posted 22 December 2006 - 10:27 PM

Um... I hate to tell you this, but I'm not sure how to turn it into a -mod thing. :)

Is that where you use FinalBig to save everything in "data/ini" as a new INI file, and use that one in place of the original one?

#15 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 22 December 2006 - 10:40 PM

It's when you store all your mod files in one .big file and link to it with a new shortcut. This new shortcut is like the normal game shortcut but with and added:
-mod "<path>yourmod.big" in the "Target" field of the shortcut. If you store your mod in "My Battle for Middle-Earth data" then you can leave away the <path>, otherwise you need to write it down. There are a lot of threads where this has been explained already, so maybe you can find one with a bit more info :)

Oh and yeah, I think it's also possible to leave the files un-.big-ed and just mention a folder where you have your files in, but I normally use a big, because it's easier to send it to other people...

Edited by Dark Lord of the Sith, 22 December 2006 - 10:43 PM.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#16 zimoo

zimoo

    Ecthelion of the Fountain

  • Project Team
  • 2,009 posts
  • Location:Devon, England
  • Projects:Lurking until the off topic begins...
  •  Guardian of the Books

Posted 22 December 2006 - 11:47 PM

GothmogtheOrc wrote a very good tutorial on this subject
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image

Playing games? Ah, you'll never be a good modder if you get involved in actually playing them!


#17 Ereinion2

Ereinion2
  • Members
  • 30 posts

Posted 23 December 2006 - 12:05 AM

Thanks so much, people!! I got it to work!! :dry: What would we new modders do without you! ;)



Um, hopefully nobody minds if I ask another question. :)

How do I add a hero onto the world map for War of the Ring? You know, like make him buildable at the fortress on the world map? I tried adding him into the "livingworldbuildings.ini" file under the fortress section, but when I tried to start a War of the Ring game, it simply crashed without any error message at all! There must be another file to edit somewhere, but I can't seem to find it.

#18 zimoo

zimoo

    Ecthelion of the Fountain

  • Project Team
  • 2,009 posts
  • Location:Devon, England
  • Projects:Lurking until the off topic begins...
  •  Guardian of the Books

Posted 23 December 2006 - 12:25 AM

Hmm now that's a tricky one. As far as I know very few people have explored WOTR...

I've added new units to it (which was easy), but heroes are probably completely different. Oh well, here goes nothing...

*Loads up BFME2 INI*

Ok here is my attempt at a brief guide:

First open data\ini\campaigns\common\livingworldbuildableunits.inc. You will see many blocks of LivingWorldPlayerArmy. You need to add a new block for your hero, using the format below:

LivingWorldPlayerArmy
	Name = ImrahilArmy;Name it suitable, this is referenced quite a bit
	DisplayNameTag = LWA:MenOfTheWest;Faction name, change it accordingly
	ArmyEntry
		ThingTemplate = GondorImrahil;Object name, again change to suit your hero
		Quantity = 1;Don't edit this if it's a hero
	End
End

Now open up data\ini\livingworldbuildings.ini, and search for LWB_MenFortress (but replace Men with the name of the faction your hero belongs to). A few lines down you'll see a BuildingNugget, here is where we make the changes. Add the following:

ArmyToSpawn
			PlayerArmy = ImrahilArmy;The same name you used earlier
			Icon = MoWArmyIcon;Change it to suit your heroes faction
			IconSize = Small;Leave this alone
			PalantirMovie = Palantir_150;And this
			BuildTime = 2;This is the buildtime of your hero in turns
			ConstructButtonImage = HIImrahil;Button image, shouldn't really be different to their normal button image but that's your own choice
			ConstructButtonTitle = CONTROLBAR:LW_Hero_Imrahil;A special WOTR-only buildable text, defined in lotr.str
			ConstructButtonHelp = CONTROLBAR:LW_ToolTipBuild_Imrahil;A special WOTR-only build tooltip, defined in lotr.str
		End

:) Then that appears to be it. I can't find any more files that need to be edited, but bear in mind this is untested, so you may get errors :/
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image

Playing games? Ah, you'll never be a good modder if you get involved in actually playing them!


#19 Ereinion2

Ereinion2
  • Members
  • 30 posts

Posted 24 December 2006 - 03:53 AM

Thanks so much, it's really that simple!

It does help to change the queue size so the new hero fits, though. That's in livingworldbuildings.ini, under the elven fortress.

In addition, if you want the auto-resolve to be able to use your hero, you have to add him into all these .ini files:

livingworldautoresolvearmor.ini
livingworldautoresolvebody.ini
livingworldautoresolveleadership.ini (if your hero has a leadership ability)
livingworldautoresolveweapon.ini

Just in case someone else decides to do this, too!

Thanks again! :blink:

#20 IthronAiwendil

IthronAiwendil

    Retired modder

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

Posted 25 December 2006 - 10:10 AM

I would rather use existing armors, weapons and bodies for your hero in WotR, that's alot easier.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users