Jump to content


Photo

Problems with WotR Coding


  • Please log in to reply
17 replies to this topic

#1 Haliros

Haliros
  • Members
  • 7 posts

Posted 28 May 2009 - 02:46 AM

So I recently enabled Arnor as a playable faction in my RotWK game, and was sad when I found out that Arnor couldn't be used as a WotR Faction (you would be defeated at the start of the game.) So I set out to make Arnor playable in WotR. Sure, it was probably a hefty task for a beginner, but I have some experience with Java programming, and while INI is a completely different programming language, I thought the coding process would be similar. Anyways, I went through the many livingworld files in the INI file, and "thought" I had reviewed/changed anything that had to do with Arnor in the files. After a while, my (many) bugs were fixed (at least, the debugger showed nothing). When I went into RotWK, I clicked 'War of the Rings', set my settings, etc. However, after clicking 'Play', the game crashed. So, I went back into the livingworld files to see what I had done wrong, and found that I had missed this small piece of code in 'data\ini\livingworld.ini'

CODE
MenBanner = GU_Banr_A
ElvesBanner = GU_Banr_A
DwarvesBanner = GU_Banr_A
IsengardBanner = MU_Banr_A
MordorBanner = MU_Banr_A
WildBanner = MU_Banr_A
;ArnorInfantryBanner = GU_Banr_A
AngmarBanner = MU_Banr_A

NeutralBanner = GU_Banr_A

MenAnts = ArmyAnts
ElvesAnts = ArmyAnts
DwarvesAnts = ArmyAnts
IsengardAnts = ArmyAnts
MordorAnts = ArmyAnts
WildAnts = ArmyAnts
;ArnorAnts = ArmyAnts
AngmarAnts = ArmyAnts


After finding this, I thought simply taking out the ';'s in front of ArnorInfantryBanner and ArnorAnts would fix the problem, but after I did that, the debugger found a parse error with those two files:

CODE
Unknown field 'ArnorInfantryBanner' in block 'LivingWorldMapInfo'
Error parsing field 'ArnorInfantryBanner' in file 'Data\INI\LivingWorld.ini'

(I get the same error for ArnorAnts if I leave the semicolon in front of ArnorInfantryBanner)

What really aggravates me is that the ArnorInfantryBanner and ArnorAnts seem to have the exact same value as the other factions...and on top of that, I can't seem to find ArnorInfantryBanner or ArnorAnts in any of the other files. Can anyone shed some light as to where I could find these values? I have a raging suspicion that if I fix those to values, WotR would work.

Thanks for helping!

#2 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 28 May 2009 - 05:35 AM

...Both are commented in ROTWK, that would usually indicate that they do not work if uncommented :p EA is known for its laziness for keeping things uncommented if it works :)
Have you given your faction starting units and such? and do those units have Livingworld bodies or whatever ? ;)

Try starting against your faction with another faction, look if a hero appears or whatever, if it does not you will most likely have a "Turn #" appear every 5 seconds :p

Edited by Ridder Geel, 28 May 2009 - 05:37 AM.

Ridder Geel

#3 Haliros

Haliros
  • Members
  • 7 posts

Posted 28 May 2009 - 03:25 PM

I just tried to start the faction against another faction, and it didn't work. But yes, I have added the starting units. In fact, that was one of the first things I did.

Ah, I should have known that EA would do something like that. I'm not a huge fan of the company EA itself, just a couple of the games that it makes (or made, I should say.)

Anyways, even if EA did leave them unfinished, there's gotta be a way to finish them, right? I mean, other modders have found out how to add factions to WotR, so why would adding a faction be any different than completing one? (Actually, I think they're both probably the same exact thing...but that's not the point!)

And perhaps I'm just barking up the wrong tree...sure, that would suck, but in the case I probably am. Still, I would love to figure this out.

#4 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 28 May 2009 - 03:33 PM

Well i dont think i can help you alot atm :good: I dont have too much experience with WOTR things :)
Ridder Geel

#5 Haliros

Haliros
  • Members
  • 7 posts

Posted 28 May 2009 - 03:58 PM

Don't worry about it, I appreciate the help you gave. ^^ I don't imagine too many people have much experience with WotR coding...but I;ll keep toying around with the code to see if I can fix anything.

#6 Annullus The Grey

Annullus The Grey

    Historian... Master of Ages

  • Hosted
  • 269 posts
  • Projects:Twilight of the Republic

Posted 29 May 2009 - 10:23 AM

your best bet is that the anor banner object doesnt exist hence whyu it is commented out, it is also likely that most of the autoresolve data for arnor also does not exist. the issues with adding a new race in and making it entirely functional for wotr mode are numerous and there is alot of code which only works if all references to the code exist.

some people have alot of experience with wotr mode coding, but adding a race unless your willing to essentially reuse another races building icons and banner icons is an extremely time consuming task, liable to take months to do properly
If your reading this i probably am drunk in a ditch somewhere near you

the magical drunken teleporter

SELF PROCLAIMED FORUM DRUNK!!

#7 Haliros

Haliros
  • Members
  • 7 posts

Posted 29 May 2009 - 02:32 PM

But as I said before, the banner in the code is exactly the same as the other good unites. Though, you are right in that I may have to add an Arnor banner anyway (as one technically does not exist).

And I did work the auto-resolve data for everything that looked like needing adding. But like I said, I'm still playing around with it, and I'm liable to have done something wrong. :p Also, I found that a lot of the code (but not all) already existed for Arnor; inf act, a lot of values and building icons from Gondor were actually used. XD

Months, eh? Well, I'm not looking for instant gratification, so I'll just keep messing with it and see what happens. ^^, Thanks for your help!

#8 Annullus The Grey

Annullus The Grey

    Historian... Master of Ages

  • Hosted
  • 269 posts
  • Projects:Twilight of the Republic

Posted 29 May 2009 - 03:02 PM

there are so many individual files which eed to be alter and tweaked to make wotr mo workand so many places whre it can fail

your error likely means you forgot to close a tag somewhere. and that is the bull of wotr mode there are about 1000 place a single line of code can break
If your reading this i probably am drunk in a ditch somewhere near you

the magical drunken teleporter

SELF PROCLAIMED FORUM DRUNK!!

#9 MrFurious

MrFurious
  • Members
  • 87 posts
  • Location:The Netherlands
  • Projects:Memories Through Middle-Earth Coder

Posted 29 May 2009 - 06:05 PM

Have you added AutoResolve data to all units you use? Right now only Argeleb, a few hordes and a few structures have AutoResolve data. I don't think it's the error you have now, but you'll surely run into it if you haven't done it. That will be pretty time-consuming.

#10 Haliros

Haliros
  • Members
  • 7 posts

Posted 30 May 2009 - 12:03 AM

Have you added AutoResolve data to all units you use? Right now only Argeleb, a few hordes and a few structures have AutoResolve data. I don't think it's the error you have now, but you'll surely run into it if you haven't done it. That will be pretty time-consuming.


I thought I had...I know I had to add Damrod in there (lack of a 4th hero,) but I thought I had done that properly...so that MAY be the problem. But again, I have no way of being certain O_O
I'm sure it wouldn't be the auto-resolve data anyways, because the problem is loading the actual living world map/factions at the beginning...unless the Auto Resolve data has something to do with WotR start-up?

Man, this is looking to be a lot of work! :p Still, I'm sure I'll get something out of it by the time I'm done..

#11 MrFurious

MrFurious
  • Members
  • 87 posts
  • Location:The Netherlands
  • Projects:Memories Through Middle-Earth Coder

Posted 30 May 2009 - 06:54 AM

I ment these:
Object ArnorArgeleb
.....
; *** AUTO RESOLVE DATA *** 
	AutoResolveUnitType = AutoResolveUnit_Hero
	AutoResolveCombatChain = AutoResolve_HeroCombatChain

	AutoResolveBody = AutoResolve_BoromirBody
	
	AutoResolveArmor
		Armor = AutoResolve_BoromirArmor
	End

	AutoResolveWeapon
		Weapon = AutoResolve_BoromirWeapon
	End

	AutoResolveLeadership = AutoResolve_BoromirBonus
.....
End

Without this, your unit can't do anything in a WotR battle, and would probably crash the game. Every building you use, every horde you can build, and every hero you can have should have such auto resolve data.

#12 Haliros

Haliros
  • Members
  • 7 posts

Posted 30 May 2009 - 07:00 PM

I ment these:

Object ArnorArgeleb
.....
; *** AUTO RESOLVE DATA *** 
	AutoResolveUnitType = AutoResolveUnit_Hero
	AutoResolveCombatChain = AutoResolve_HeroCombatChain

	AutoResolveBody = AutoResolve_BoromirBody
	
	AutoResolveArmor
		Armor = AutoResolve_BoromirArmor
	End

	AutoResolveWeapon
		Weapon = AutoResolve_BoromirWeapon
	End

	AutoResolveLeadership = AutoResolve_BoromirBonus
.....
End

Without this, your unit can't do anything in a WotR battle, and would probably crash the game. Every building you use, every horde you can build, and every hero you can have should have such auto resolve data.

I thought all of those were covered in seperate files? Is there one file where I must add all of that information?

#13 MrFurious

MrFurious
  • Members
  • 87 posts
  • Location:The Netherlands
  • Projects:Memories Through Middle-Earth Coder

Posted 31 May 2009 - 11:24 AM

It should be in the object's (or horde's) ini file, inside the object. As you can see, it tells what they are, what weapon they use, what armor they have, and so on. If you try to load a hero (like Damrod) without this data (or at least a body), it will probably crash. They won't be able to fight anyway, so you'd better add them. Some of them (like the fortress, some of the hordes, Argeleb) already have them, but others don't.

#14 Haliros

Haliros
  • Members
  • 7 posts

Posted 31 May 2009 - 11:45 PM

It should be in the object's (or horde's) ini file, inside the object. As you can see, it tells what they are, what weapon they use, what armor they have, and so on. If you try to load a hero (like Damrod) without this data (or at least a body), it will probably crash. They won't be able to fight anyway, so you'd better add them. Some of them (like the fortress, some of the hordes, Argeleb) already have them, but others don't.

Ah, so it's separate from the living world files!! Thank you so much...I'll work on those to see if they fix anything...thanks again!

#15 tanevski

tanevski
  • Members
  • 5 posts

Posted 02 July 2010 - 08:18 AM

I have add everything to autoresolvebody and other autoresolve livingworld and more for arnor: auto resolve for arnorarchers, for arnorfighter , for arnorknights, heroes, fortress, catapults and more but still when i try to play wotr with arnor i cant see arnor at all i cna only see how other are ending turns fighting battles but i cant see my anywhere on WOTR map its like Arnor faction is playable on skirmish but its not on wotr and i really like wotr thats like my favourite part of ROTWK so plzzz SOMEONE HELP ME MAKE ARNOR PLAYABLE AS WOTR FACTION.pllllssss!!!

#16 tanevski

tanevski
  • Members
  • 5 posts

Posted 03 July 2010 - 12:44 PM

data\ini\livingworldplayers-->

//-------------------------------------------------------------------------------------------------
// Arnor
//-------------------------------------------------------------------------------------------------

;LivingWorldPlayerTemplate PlayerArnor

; Faction = FactionArnor

; StartingWorldCP = 1500
; MaxWorldCP = 4500

; StartingHeroCP = 450
; MaxHeroCP = 450

; ScenarioStartResources = 3000
;ScenarioMaxResources = 25000 // 25000 is the default

; FactionIcon = "IconArnorStrategic"
; DefaultArmyIconName = "ArnorArmyIcon"
; BuildPlotIconName = "BuildPlotIcon_Arnor"
; BuildPlotSelectionPortraitName = "BPWFortress_BuildPlot"
; GarrisonSelectionPortraitName = "UPGoblinArmy"
; GarrisonDisplayNameTag = "LWA:ArnorGarrison"

; Music = WOTR_MusicGoblinsMS
; AutoResolveLoop = WotR_AutoresolveBattle

; FactionDozerTemplateName = "ElvesPorter"
; FactionInnUnitTemplateName = "IsengardWildmanHordeInn"
;End

CHANGE THIS TO:


//-------------------------------------------------------------------------------------------------
// Arnor
//-------------------------------------------------------------------------------------------------

LivingWorldPlayerTemplate PlayerArnor

Faction = FactionArnor

StartingWorldCP = 1500
MaxWorldCP = 4500

StartingHeroCP = 450
MaxHeroCP = 450

ScenarioStartResources = 3000
;ScenarioMaxResources = 25000 // 25000 is the default

FactionIcon = "IconArnorStrategic"
DefaultArmyIconName = "ArnorArmyIcon"
BuildPlotIconName = "BuildPlotIcon_Arnor"
BuildPlotSelectionPortraitName = "BPWFortress_BuildPlot"
GarrisonSelectionPortraitName = "UPGoblinArmy"
GarrisonDisplayNameTag = "LWA:ArnorGarrison"

Music = WOTR_MusicGoblinsMS
AutoResolveLoop = WotR_AutoresolveBattle

FactionDozerTemplateName = "ElvesPorter"
FactionInnUnitTemplateName = "IsengardWildmanHordeInn"
End

//-------------------------------------------------------------------------------------------------
// Angmar
//-------------------------------------------------------------------------------------------------

LivingWorldPlayerTemplate PlayerAngmar

Faction = FactionAngmar

StartingWorldCP = 1500
MaxWorldCP = 4500

StartingHeroCP = 450
MaxHeroCP = 450

ScenarioStartResources = 3000
;ScenarioMaxResources = 25000 // 25000 is the default

FactionIcon = "IconAngmarStrategic"
DefaultArmyIconName = "AngmarArmyIcon"
BuildPlotIconName = "BuildPlotIcon_Angmar"
BuildPlotSelectionPortraitName = "KUFortressBuildPlot"
GarrisonSelectionPortraitName = "UPAngmarArmy"
GarrisonDisplayNameTag = "LWA:AngmarGarrison"

Music = WOTR_MusicGoblinsMS
AutoResolveLoop = WotR_AutoresolveBattle

FactionDozerTemplateName = "AngmarPorter"
FactionInnUnitTemplateName = "AngmarWildmanHordeFree"

End

I will try more coding but i think this helps lil

#17 drogoth232

drogoth232

    What a shame

  • Members
  • 1,268 posts
  • Location:United States

Posted 03 July 2010 - 02:21 PM

Hehe, guess no one noticed my mod! :p

It adds Arnor as a playable faction with a (hopefully, havent fully tested it) fully functional WOTR. Go over to the3rdage.net and search for the Age of Arnor mod. (its still beta).
Wait... what?

#18 tanevski

tanevski
  • Members
  • 5 posts

Posted 04 July 2010 - 10:42 AM

Thnx i will try that mod




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users