Jump to content


Photo

Changing/inserting a mod feature crashes the game


  • Please log in to reply
19 replies to this topic

#1 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 26 September 2007 - 04:49 PM

First of all - hi everyone, I'm new here. :)
I'm what you could consider a noob at modding, since my last experiences in that matter date back to 7 or 8 years ago, when I used to fool around with Tiberian Sun.

Now straight to the problem:

I'm working on a rebalancing mod for TW. Besides changing most values and adding only a few things (so that I won't destroy balance completey instead of improving it), I wanted to make use of the DamageScalarDetails feature to emphasize strengths and weaknesses of units against specific targets.

When doing this, I first encountered a problem when I tried to modify a weapon I added for the Orca - a chaingun that should inflict slightly higher damage against infantry and aircraft. After fiddling about it without success - whenever I added a DamageScalar, the game kept crashing on me during the start - I decided to put that feature back for a bit.

Alright - I supposed it had to do something with being a weapon I added myself (firing animations don't work, either), so now I'm trying to do the same with the Mammoth Tank missile.

This is what I'm trying to do:

<WeaponTemplate
		id="GDIMammothTankMissileFragmentWarhead"
		Name="GDIMammothTankMissileFragmentWarhead" 
		ProjectileCollidesWith  = "ENEMIES STRUCTURES" 
		RadiusDamageAffects="ALLIES ENEMIES NOT_SIMILAR"
		AntiMask="ANTI_GROUND ANTI_AIRBORNE_VEHICLE ANTI_AIRBORNE_INFANTRY">
		<Nuggets>
			<DamageNugget 
				Damage="500.0" 
				Radius="20.0"
				DamageTaperOff="0"
				DamageType="ROCKET" 
				DamageFXType="GDI_MISSILE"
				DeathType="EXPLODED" />
				<DamageScalarDetails Scalar= "150%">
					<Filter
						Rule="NONE"
						Include="AIRCRAFT STRUCTURE" />
				</DamageScalarDetails>
			</DamageNugget>
			<SuppressionNugget
				Radius="20.0"
				Suppression="50"
				DurationSeconds="5s" />
		</Nuggets>
	</WeaponTemplate>

When I start the game, I'm getting a crash message. Without the DamageScalarDetails, it runs just fine. Does it have anything to do with the Suppression Nugget? Or did I forget something important?

I'd be really glad if someone could point out what I'm doing wrong. Thanks in advance!

#2 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 26 September 2007 - 05:11 PM

I swear, you really made me doubtful of my skills with that question. The answer is simple though. As soon as you have more than one KindOf flag in Include="...", you need Rule="ANY" :)

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.


#3 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 26 September 2007 - 05:38 PM

I swear, you really made me doubtful of my skills with that question. The answer is simple though. As soon as you have more than one KindOf flag in Include="...", you need Rule="ANY" ;)


Thanks for your reply! ;)

I tried it, but it doesn't work. I'm still getting an error message :)

<WeaponTemplate
		id="GDIMammothTankMissileFragmentWarhead"
		Name="GDIMammothTankMissileFragmentWarhead" 
		ProjectileCollidesWith  = "ENEMIES STRUCTURES" 
		RadiusDamageAffects="ALLIES ENEMIES NOT_SIMILAR"
		AntiMask="ANTI_GROUND ANTI_AIRBORNE_VEHICLE ANTI_AIRBORNE_INFANTRY">
		<Nuggets>
			<DamageNugget 
				Damage="500.0" 
				Radius="20.0"
				DamageTaperOff="0"
				DamageType="ROCKET" 
				DamageFXType="GDI_MISSILE"
				DeathType="EXPLODED" />
				<DamageScalarDetails Scalar= "150%">
					<Filter
						Rule="ANY"
						Include="AIRCRAFT STRUCTURE" />
				</DamageScalarDetails>
			</DamageNugget>
			<SuppressionNugget
				Radius="20.0"
				Suppression="50"
				DurationSeconds="5s" />
		</Nuggets>
	</WeaponTemplate>

This is what I have now... Any other ideas?
I can rule out other causes, as it works fine without it. Mhh, I must've overlooked something important (or my general code understanding just isn't good enough).

#4 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 26 September 2007 - 05:49 PM

Impossible! That code looks absolutely perfect now.
Either those changes didn't take effect, you have another mistake somewhere or I should maybe better stop modding C&C3 right now :)

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.


#5 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 26 September 2007 - 06:00 PM

Impossible! That code looks absolutely perfect now.


That's what I think, too. I even compared it to another weapon, which is working just fine (even without the Include="ALL").

And now the crazy part: I removed it again to prove it's nothing else f'ing up my game and it works just fine. It's not even funny anymore ;)

Either those changes didn't take effect, you have another mistake somewhere or I should maybe better stop modding C&C3 right now :)


Please, don't stop modding right now! ... First you've got to to make an important discovery by locating the source of this error :p

Seriously, I really don't know what to think now. It seems to have something to do with the weapon/warhead itself - as if somewhere else something was missing to activate DamageScalar behavior. ;)

#6 GodSun666

GodSun666

    Marching Trough The Eternal Fields Of Chaos!

  • Banned
  • 1,439 posts
  • Location:The Netherland @ Nod HQ!
  • Projects:Fast Fun And Crazy for Red Alert 3

Posted 26 September 2007 - 06:24 PM

Hmmm, tried the appropite .XSD file? Soz for spelling IDk how to spell that word!:).. Anyways, youré awnser should be in one of the .XSD files !! Goodluck finding wich one you need! Since IDK What one... ;)
для матери Россия! Советский Союз победит! Америка может облизывать мои яйца
Posted Image
Posted Image

#7 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 26 September 2007 - 06:32 PM

Hmmm, tried the appropite .XSD file? Soz for spelling IDk how to spell that word!:).. Anyways, youré awnser should be in one of the .XSD files !! Goodluck finding wich one you need! Since IDK What one... ;)


Thanks! I'll have a look at it. (I doubt I'll find it, though. ;) )

#8 GodSun666

GodSun666

    Marching Trough The Eternal Fields Of Chaos!

  • Banned
  • 1,439 posts
  • Location:The Netherland @ Nod HQ!
  • Projects:Fast Fun And Crazy for Red Alert 3

Posted 26 September 2007 - 06:45 PM

Its under the folder Shemas! then Xsd .. then it should be under modules.. or somewhere else !
для матери Россия! Советский Союз победит! Америка может облизывать мои яйца
Posted Image
Posted Image

#9 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 26 September 2007 - 06:46 PM

The schema doesn't contain any particularly interesting information in this case, unfortunately.
The only "solution" I can think of is deleting the DamageScalar part and rebuilding it. The probability that it works is very small, but one can never know. Sometimes, modding is magic.

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.


#10 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 26 September 2007 - 07:38 PM

The only "solution" I can think of is deleting the DamageScalar part and rebuilding it. The probability that it works is very small, but one can never know. Sometimes, modding is magic.


Been there, done that - won't work, unfortunately.
I'm kinda running out of ideas (which is not too unusual considering my limited knowledge about TW modding TBH). :)

#11 user_unknown

user_unknown

    Federation Supreme Commander

  • Hosted
  • 404 posts
  • Location:London
  • Projects:Event Horizon

Posted 27 September 2007 - 07:29 PM

The problem is still with the filter -saying ANY and then including STRUCTURE and VEHICLE doesn't make any sense. If you use ALL, you must use Exclude, and if you use NONE you must use Include.

Anyway, try this (from the EMP code)

<SpecialObjectFilter
Rule="ALL"
Exclude="UNATTACKABLE INFANTRY CIVILIAN_BUILDING TIBERIUM TIBERIUM_FIELD"/>


Excludes everything *except* vehicles and structures :)

Edited by user_unknown, 27 September 2007 - 07:34 PM.


#12 Stygs

Stygs
  • Members
  • 99 posts

Posted 27 September 2007 - 07:48 PM

I think your problem is this:

<DamageNugget
Damage="500.0"
Radius="20.0"
DamageTaperOff="0"
DamageType="ROCKET"
DamageFXType="GDI_MISSILE"
DeathType="EXPLODED" />
<DamageScalarDetails Scalar= "150%">
<Filter
Rule="ANY"
Include="AIRCRAFT STRUCTURE" />
</DamageScalarDetails>
</DamageNugget>

remove the "/" from the "DeathType" line, because its obsolent

Edited by Chriz, 27 September 2007 - 07:50 PM.


#13 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 27 September 2007 - 07:50 PM

The problem is still with the filter -saying ANY and then including STRUCTURE and VEHICLE doesn't make any sense. If you use ALL, you must use Exclude, and if you use NONE you must use Include.

Actually it should work, because you can find this in Weapon.xml:
<DamageScalarDetails Scalar= "99999%">
					<Filter
						Rule="ANY"
						Include="STRUCTURE VALID_TARGET_FOR_C4" 
					/>
				</DamageScalarDetails>

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.


#14 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 27 September 2007 - 07:56 PM

The problem is still with the filter -saying ANY and then including STRUCTURE and VEHICLE doesn't make any sense. If you use ALL, you must use Exclude, and if you use NONE you must use Include.


If you look at my first post, that's exactly what I did. And it didn't work, unfortunately.

Anyway, try this (from the EMP code)

<SpecialObjectFilter
Rule="ALL"
Exclude="UNATTACKABLE INFANTRY CIVILIAN_BUILDING TIBERIUM TIBERIUM_FIELD"/>


Excludes everything *except* vehicles and structures :D


I'll try that.

@Chriz: Good idea... Although it should work the way it is.

I'll be right back :)

#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 27 September 2007 - 08:01 PM

Chriz is right, we all just overlooked it... ouch :)

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 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 27 September 2007 - 08:17 PM

Chriz is right, we all just overlooked it... ouch :)


I'm absolutely speechless. It is an incredible truckload of fail that I did not notice it earlier. Thanks for the help guys, thanks Chriz!

<Nuggets>
			<DamageNugget
				Damage="500.0"
				Radius="20.0"
				DamageTaperOff="0"
				DamageType="ROCKET"
				DamageFXType="GDI_MISSILE"
				DeathType="EXPLODED">
				<DamageScalarDetails Scalar= "150%">
					<Filter
						Rule="NONE"
						Include="AIRCRAFT STRUCTURE" />
				</DamageScalarDetails>
			</DamageNugget>
			<SuppressionNugget
				Radius="20.0"
				Suppression="50"
				DurationSeconds="5s" />
		</Nuggets>

Looks like this now and at least it starts just fine.


Oh, another quick question (I don't want to make another thread for it):
I changed the APC so it can now hold 2 units. But this does not seem to include the APCs brought in by V35Ox. Where can I change the values for those? I looked for it, but couldn't find it.

#17 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 27 September 2007 - 08:24 PM

It's the GDIAPC_Veteran. Actually this would be a child object and as such also include your changes, but the reference is to the one in CnC3Xml.
So if you want to keep the style, change
<Include
			type="instance"
			source="DATA:GDI/Units/GDIAPC.xml" />
to
<Include
			type="instance"
			source="DATA:_YOURMOD_/_YOURPATH_/GDIAPC.xml" />

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.


#18 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 27 September 2007 - 08:27 PM

It's the GDIAPC_Veteran. Actually this would be a child object and as such also include your changes, but the reference is to the one in CnC3Xml.
So if you want to keep the style, change

<Include
			type="instance"
			source="DATA:GDI/Units/GDIAPC.xml" />
to
<Include
			type="instance"
			source="DATA:_YOURMOD_/_YOURPATH_/GDIAPC.xml" />


Cool! I didn't know that. Thank you very much. :)

#19 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 27 September 2007 - 08:31 PM

That's the way all the child objects are set up. It's pretty handy for some small variations like initial veterancy, because all the changes of the original will also affect the new unit (unless you orverride things of course).
Maybe I should write a tutorial about that...

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.


#20 XTRMNTR2K

XTRMNTR2K
  • Members
  • 14 posts
  • Location:Germany

Posted 27 September 2007 - 08:36 PM

That's the way all the child objects are set up. It's pretty handy for some small variations like initial veterancy, because all the changes of the original will also affect the new unit (unless you orverride things of course).
Maybe I should write a tutorial about that...


That would be great! And I'm sure it would help a lot of people just getting into TW modding as well as reducing the number of questions asked repeatedly over and over again. :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users