XL mode [Solved]
Moderator: Moderators
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
XL mode [Solved]
How do you add XL mode? I looked at the tutorial on how to add hunt mode, thinking they'd be the same, but I suppose not. I got these error while munging:
I suppose I ought to mention that my XL is a misison script that I made with the MIssion Scripter, then added a few lines. What's the problem? I'm not good at reading error logs.
Hidden/Spoiler:
-
RepSharpshooter
- Gametoast Staff

- Posts: 1351
- Joined: Tue Jul 10, 2007 4:10 pm
Re: XL mode
Hidden/Spoiler:
It looks like your RCHg_eli.lua is bad too.
-
Aman/Pinguin
- Jedi

- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
Re: XL mode
Post your lua.
EDIT: Rep was faster. >.<
EDIT: Rep was faster. >.<
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
Ok, I found out that the first four errors were cause by a badly placed ActivateRegion line. Those are fixed. Still, I get this while munging:
My Campaign (XL) LUA:
And I removed the RCHg_eli from the addme.lua. I don't need it, anyway.
EDIT - Word has a "Go to line" ability. Could I use that to find the error, then Notepad to fix it?
EDIT 2 - My Mungelog:
Hidden/Spoiler:
Hidden/Spoiler:
EDIT - Word has a "Go to line" ability. Could I use that to find the error, then Notepad to fix it?
EDIT 2 - My Mungelog:
Hidden/Spoiler:
-
RepSharpshooter
- Gametoast Staff

- Posts: 1351
- Joined: Tue Jul 10, 2007 4:10 pm
Re: XL mode
No because the line starts at 0 every time you go to a new page. I really reccomend editplus anyways. You can even download a lua syntax checker to turn comments green, strings pink, numbers purple etc like pro editors.Fiodis wrote:And I removed the RCHg_eli from the addme.lua. I don't need it, anyway.
EDIT - Word has a "Go to line" ability. Could I use that to find the error, then Notepad to fix it?
Going to line 563 with editplus:
Hidden/Spoiler:
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
Wierd....are you sure that the "reset-line-count-at-every-page" thing is true for Office Word? I hit ctrl+g, typed in 563, and it took me straight to that line. Anyway, why should I delete that? I took that straight from the tutorial on making a teleporter. Granted, I found a few problems with that tutorial; but I've never had an issue with that line before.
But then also granted, I haven't set up many teleporters before. Still, the first one I got working, so I know the process. Won't deleting that just deactivate the teleporter?
Still I'll try what you say, you being a far more advanced scripter than I am.
But then also granted, I haven't set up many teleporters before. Still, the first one I got working, so I know the process. Won't deleting that just deactivate the teleporter?
Still I'll try what you say, you being a far more advanced scripter than I am.
-
RepSharpshooter
- Gametoast Staff

- Posts: 1351
- Joined: Tue Jul 10, 2007 4:10 pm
Re: XL mode
Oh not delete, I'm sorry, I didn't see the on enter region
I think it should be like that. The name of the region comes at the end, not the beginning.
And maybe my Word is different, whatever works for you!
Code: Select all
OnEnterRegion(
function(regIn,character)
MoveEntityToNode(character,"TeleportNode3")
end,
"TeleportRegion3"
)And maybe my Word is different, whatever works for you!
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
Edited, cleaned, remunged, and it still insists something's wrong, this time with another teleport line. My error log says
My Word finds line 578 to be
But that line has no " so I'm assuming my Word's off by some amount. As such, I have no way of telling which line is the problem, except for manually counting them up.
While I do that, could someone please run it through something like Editplus? We'll see who gets to line 578 first.
1...2...3....
Hidden/Spoiler:
My Word finds line 578 to be
Hidden/Spoiler:
While I do that, could someone please run it through something like Editplus? We'll see who gets to line 578 first.
1...2...3....
-
RepSharpshooter
- Gametoast Staff

- Posts: 1351
- Joined: Tue Jul 10, 2007 4:10 pm
Re: XL mode
Yeah word is a bit off.
Delete what's in red:
You kept adding the region's name at the beginning, when it only should go at the end.
Delete what's in red:
Hidden/Spoiler:
You kept adding the region's name at the beginning, when it only should go at the end.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
I forgot to upload an updated LUA. I had already deleted the OnEnterRegion bugs. But as for the comma, why shouldn't I add it to each of the "TeleportRegionX" lines? Why only to "TeleportRegion5"?
EDIT - Added the comma to all 5 of the "TeleportRegionX" lines, got a kick in the teeth:
EDIT - Added the comma to all 5 of the "TeleportRegionX" lines, got a kick in the teeth:
Hidden/Spoiler:
- ThePanda
- Private Second Class
- Posts: 74
- Joined: Sat Dec 20, 2008 4:22 pm
Re: XL mode
Delete the commas, I think they're the unexpected symbols.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
But...Rep told me to add those, at least the one by the 5th TeleportRegion line. I'll delete all except that one and see what happens.
EDIT - Done that, and I'm back where I was three posts ago with
EDIT - Done that, and I'm back where I was three posts ago with
Hidden/Spoiler:
-
RepSharpshooter
- Gametoast Staff

- Posts: 1351
- Joined: Tue Jul 10, 2007 4:10 pm
Re: XL mode
Ugh, no comma there, sorry, misread it. But can you post a current lua?
It says there's unfinished quotes "" but in my version I see them all completed :/
It says there's unfinished quotes "" but in my version I see them all completed :/
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
Ok, the rouge comma was captured and carted away. The result:
And the current LUA:
And let me take this chance to say thank you for sharing my headache.
EDIT - Since this has mostly been a back-and-forth between you and me, Rep, how about we finish this tomorrow on Xfire? Mine's Fiodis.
Hidden/Spoiler:
Hidden/Spoiler:
EDIT - Since this has mostly been a back-and-forth between you and me, Rep, how about we finish this tomorrow on Xfire? Mine's Fiodis.
-
FragMe!
- Gametoast Staff

- Posts: 2244
- Joined: Sat May 13, 2006 12:34 am
- Projects :: Not sure keep changing my mind.
- xbox live or psn: No gamertag set
- Location: Origin name GT_FragMe
- Contact:
Re: XL mode
Old saying, don't always believe what you read,
Using a different lua editor, SciTE, it came up with this
It is reporting the " after OnEnterRegion( does not have a closing quote. This is down around line 616
Using a different lua editor, SciTE, it came up with this
Code: Select all
OnEnterRegion("
function(regIn,character)
MoveEntityToNode(character,"TeleportNode5")
end,
"TeleportRegion5"
)
ActivateRegion("TeleportRegion5")
end- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
It worked!
But the objectives stay in their cages and refuse to come out. No matter how much I coax them, they do not start. The mungelog, the shortest one I've had in a while:
Also there's a few bits about missing geometries and unbuilt props and missing capture regions and such, but meh, you know mungelogs: always complaining. As far as I know, I added all those things. I'll double check those. Getting the objectives to start is more important.
I suppose it's not starting because the game can't find the timer that starts it off. Where is it hiding?
But the objectives stay in their cages and refuse to come out. No matter how much I coax them, they do not start. The mungelog, the shortest one I've had in a while:
Hidden/Spoiler:
I suppose it's not starting because the game can't find the timer that starts it off. Where is it hiding?
-
RepSharpshooter
- Gametoast Staff

- Posts: 1351
- Joined: Tue Jul 10, 2007 4:10 pm
Re: XL mode
I think you forgot to add the BeginObjectivesTimer() function and related stuff. Just copy a template out of an exist campaign lua and tailor it to yours.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
Argh! It's almost working. It's so close to working you can almost feel it. The only Mugnelog message about the script was this:
My updated LUA:
I can see that StartObjectives () has nothing in the (). But what should be there? I don't want to risk putting in the wrong thing and messing up my LUA, then forget what the right thing was. I assume I have to list the objectives there, but how?
Should it be StartObjectives (Objective1, Objective2, <etc.>)? Or do they have to have quotation marks around them?
EDIT - Can't believe I forgot to ask this. This timer script is copied directly from the Coruscant script for Knightfall. Thus that script also has a StartObjectives () with nothing in the (). So how come it's timer works and mine doesn't?
Hidden/Spoiler:
Hidden/Spoiler:
Should it be StartObjectives (Objective1, Objective2, <etc.>)? Or do they have to have quotation marks around them?
EDIT - Can't believe I forgot to ask this. This timer script is copied directly from the Coruscant script for Knightfall. Thus that script also has a StartObjectives () with nothing in the (). So how come it's timer works and mine doesn't?
-
RepSharpshooter
- Gametoast Staff

- Posts: 1351
- Joined: Tue Jul 10, 2007 4:10 pm
Re: XL mode
You are referencing StartObjectives but it is defined no where, so it doesn't exist (a nil value).
Copy one of the definitions of the function from another lua and tailor it to yours.
You must always have:
Before you can call it like this
You are probably confused with functions such as SetEntityMatrix(charUnit,locDest) which are already defined in the battlefront game itself (or some in other shipped luas).
Copy one of the definitions of the function from another lua and tailor it to yours.
You must always have:
Code: Select all
function name( parameters or none if you dont need them )
--do stuff
endCode: Select all
name()- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: XL mode
Ah, thanks for clearing that up. The objectives start, but now that they do, yet another problem is revealed. The first objective, go to the region gotoprime2, works just fine. The second doesn't. I can't understand that, because the mungelog says:
The last 3 say that it can't find the region goto1, but goto1 is clearly labeled and placed in the xl layer of ZE. It's name is goto1, it's type is goto1. I don't see why the game doesn't see it.
Also, that first Severity: 3 is listed about 19 times or so. What does it mean?
EDIT - All of the severity: 3's deal with line 158.
Hidden/Spoiler:
Also, that first Severity: 3 is listed about 19 times or so. What does it mean?
EDIT - All of the severity: 3's deal with line 158.
