Jump to content


Photo

Index lists


  • Please log in to reply
10 replies to this topic

#1 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 16 April 2006 - 09:23 PM

Several times I've come across this type of error:

index_error.jpg

I know what this error is about, but know not how to solve it.
Can we add new tokens in a list, that I just haven't heard of yet?
Or is this something that is hardcoded, and unreachable for us?
Is it new in BFME II, or is it a know thing from BFME I, which EA has perhaps even made a statement about?
If someone can give me any answers on any of these questions, I would be very glad to hear them.

Most of the time, there are ways around the problem, but they are not always easy to find or code.

Solinx
Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#2 Stealthsnake

Stealthsnake

    Battles of Gondor mod leader

  • Hosted
  • 976 posts
  • Location:United Kingdom
  • Projects:Battles of Gondor
  •  coder, skinner, mapper, graphics

Posted 16 April 2006 - 11:36 PM

yes i got this error when i was tring to make a new trype of formation unit (or wahtever u call them) for the peasant horde,
Posted Image
Posted Image
a mod for rotwk, includes Harad, Rhun, Rohan and Southern Fiefdoms Factions, beta released, site/forums for the mod is here.

#3 Theo

Theo

    Hey look, im a VIP.

  • Members
  • 222 posts
  • Location:Sheffield, Uk,
  • Projects:Being lazy.

Posted 16 April 2006 - 11:36 PM

its a similar error i got when trying to add a new faction and making the cah available to it. somewhere there must be a file (a hardcoded one if that) that has an index of lots of different variables.(word variables) and only on there can you change the index values. iv had a look at most ini and inc files and cant find them anywhere for now we will have to be annoyed.

Edited by J-a-Y, 16 April 2006 - 11:37 PM.


#4 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 16 April 2006 - 11:50 PM

yes i got this error when i was tring to make a new trype of formation unit (or wahtever u call them) for the peasant horde,


Yeah, it seems to show up on everything new you enter in a ini file. It all needs to be listed in the index. :(

I've been looking at game.dat just now. That file is... large! :) And all the scripts are encrypted/unreadable, as was to be expected. Only a few things are readable with a hexeditor, I've seen nothing really special yet, most of what I saw are comments (or maybe messages).
Haven't used a hexeditor before, so it might just be me, doing something wrong :lol:

Solinx
Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#5 Rockon12

Rockon12
  • Project Team
  • 197 posts
  • Location:United States
  • Projects:Age of Elves, Galaxy at War

Posted 16 April 2006 - 11:54 PM

I am assuming you had something like "ModelConditionState = CRATEUPGRADE_ONE" or maybe "Conditions = CRATEUPGRADE_ONE". The problem is that there is an "index list" of all the different flags you can use; you can't just make one up. Some flags you could use instead are:

-MOUNTED
-WEAPONSET TOGGLE_1
-PLAYER_UPGRADE

I think you can also use "PLAYER_UPGRADE 2" and so on. Btw, I'm not sure if all that spelling is right so check underscore placement in the INI's. Just make sure what you add those too don't already use that flag. For example, something that can mount will already use MOUNTED, a unit that can change its weapon will have WEAPONSET TOGGLE_1, and PLAYER_UPGRADE is used with units that can get upgrades purchased at an armory.
Posted Image

#6 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 17 April 2006 - 12:15 AM

I am assuming you had something like "ModelConditionState = CRATEUPGRADE_ONE" or maybe "Conditions = CRATEUPGRADE_ONE". The problem is that there is an "index list" of all the different flags you can use; you can't just make one up. Some flags you could use instead are:

-MOUNTED
-WEAPONSET TOGGLE_1
-PLAYER_UPGRADE

I think you can also use "PLAYER_UPGRADE 2" and so on. Btw, I'm not sure if all that spelling is right so check underscore placement in the INI's. Just make sure what you add those too don't already use that flag. For example, something that can mount will already use MOUNTED, a unit that can change its weapon will have WEAPONSET TOGGLE_1, and PLAYER_UPGRADE is used with units that can get upgrades purchased at an armory.

You are right, and I thank you for the help, but I already knew that. Now I read it again I have to admit that "I know what this error is about, but know not how to solve it." is a bit vague and didn't have to mean I already knew all you said at all.

Btw. I tried to use PLAYER_UPGRADE_2 for a weaponset, but that token seems to only works for armorsets, which have the possibility of setting a flag. (armorsets can use both nr 1 and 2, weapons only 1) I know I can solve the problem by creating new units for every x weaponsets and link them with MountedTemplate, but that is just another workaround that requires a lot more coding than adding a simple token to a list.

About game.dat, look at this:
gamedat.jpg
A complete list of settings used in weapon.ini. But without the uncrypted code it is pretty useless, because there are no pointers to set. It just shows what you can use in weapon.ini

Solinx
Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#7 Rockon12

Rockon12
  • Project Team
  • 197 posts
  • Location:United States
  • Projects:Age of Elves, Galaxy at War

Posted 17 April 2006 - 12:19 AM

I always thought you could use flags for whatever you want. For example, in my mod I used the ModelConditionState = MOUNTED for Haldir's Galadhrim state. Then again I could be wrong. Also, how is the unit aquiring this flag? If it's through a button, make sure the "FlagsUsed" or whatever it is is the same as the flag you use in the code. Try using MOUNTED if the unit does not already have that state.
Posted Image

#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 17 April 2006 - 12:36 AM

[quote name='Solinx' date='Apr 16 2006, 05:15 PM' post='278479'] [quote name='Rockon12' post='278476' date='Apr 17 2006, 01:54 AM']
About game.dat, look at this:
gamedat.jpg
A complete list of settings used in weapon.ini. But without the uncrypted code it is pretty useless, because there are no pointers to set. It just shows what you can use in weapon.ini

Solinx [/quote]

Oh my goodness... What exactly were you doing in game.dat? From what Ive heard, there isnt anything usefull in there... Just alot of Jibberish.
Posted Image
--------------------------------------
"You look like a ghost of your former self..."

#9 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 17 April 2006 - 12:48 AM

I always thought you could use flags for whatever you want. For example, in my mod I used the ModelConditionState = MOUNTED for Haldir's Galadhrim state. Then again I could be wrong. Also, how is the unit aquiring this flag? If it's through a button, make sure the "FlagsUsed" or whatever it is is the same as the flag you use in the code. Try using MOUNTED if the unit does not already have that state.

hehe, that's the problem... I used all the states I could think of or find and get to work :lol:

Here is the code I used:
From Siegemod_trebuchet.ini (my own object, modded copy of trebuchet.ini)
	WeaponSet
		Conditions = PLAYER_UPGRADE_2;CLOSE_RANGE CONTESTING_BUILDING
		Weapon = PRIMARY	Siegemod_GondorTrebuchetFireSiege
	End

	...

	Behavior = WeaponSetUpgrade ModuleTag_TestingWeaponSet
		TriggeredBy	= Upgrade_TestingWeaponSet
	End
At this the game states that the condition given in the WeaponSet is no good.
Now look at this from rohanrohirrim.ini:
	ArmorSet	;Horse Shield
		Conditions		= PLAYER_UPGRADE
		Armor			= RohirrimShieldArmor ;RohirrimHorseShieldArmor
		DamageFX		= NormalDamageFX
	End
	ArmorSet	;Heavy Armor
		Conditions		= PLAYER_UPGRADE_2
		Armor			= RohirrimHeavyArmor
		DamageFX		= NormalDamageFX
	End

	...

	Behavior = ArmorUpgrade ArmorUpgradeModuleTag
		TriggeredBy				= Upgrade_RohanHeavyArmorForRohirrim
		ArmorSetFlag			= PLAYER_UPGRADE_2
	End

	...

	Behavior = ArmorUpgrade ModuleTagHorseShield
		TriggeredBy				= Upgrade_RohanHorseShield
		ArmorSetFlag			= PLAYER_UPGRADE
	End
It sets a flag to use the second upgrade. I tried using WeaponSetFlag, but that is unknown and gives an error.

Oh my goodness... What exactly were you doing in game.dat? From what Ive heard, there isnt anything usefull in there... Just alot of Jibberish.

:) You heard right. Nothing usefull, only a list of the things you may be able to use. I just took a quick look at it.

Solinx

Edited by Solinx, 17 April 2006 - 10:16 AM.

Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#10 ched

ched

    .

  • Undead
  • 4,431 posts
  • Location:Angers (France)
  • Projects:Rhovanion Alliance
  •  T3A Team Chamber Member
  • Division:BFME
  • Job:Previous Division Leader

Posted 18 April 2006 - 03:48 PM

you can't edit game.dat, unless you somehow decompile it and then somehow recompile it again.

And that may not even be legal :)
Software is like sex; it's better when it's free ~Linus Torvald

#11 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 18 April 2006 - 03:55 PM

you can't edit game.dat, unless you somehow decompile it and then somehow recompile it again.

And that may not even be legal ;)


I would be suprised if it is. :)
But I was just wondering if EA ever said anything about these restrictions to the nummer of tokens. It must be bugging a lot of modders.

Solinx
Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users