Goto https://www.stucuk.netGoto https://www.atlanticaonlinewiki.comGoto https://www.game-requirements.comGoto https://www.owsupport.com
It is currently Mon Dec 18, 2017 11:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Fri Apr 17, 2015 2:42 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
EVERYTHING PERFECTLY CLEAR :D
Thank you!


(so... no list then?)


Top
 Profile  
 
PostPosted: Fri Apr 17, 2015 4:15 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
cornel wrote:
(so... no list then?)

Its just whatever they call things in the lua code. In one mission they could call something bob, in another a similar thing could be called sally.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Fri Apr 17, 2015 4:21 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
This method gives me an error:


"...Well you can change the default system by using changing the following in default_ini.lua: Code: ini.startLocation="empty_system";
You would also have to remove iRootMenu.Open() from:
Code: system.execute({
"iTimers.Start(1000, callback)",
"iDesktop.PlayLogoSequence(callback)",
"iDesktop.PlayMovie(iGame.IntroMovie, nil, callback, {BlackBackground=1})",
"iRootMenu.Open()",
})..."


The error is logged as follows: ErrorText 0 : TBaseGameObject.Get error: objPath:->scene->_G _id:exp_mission1_1part Self.id:scene

I did everything as described...

new.cfg:
startLocation='exp_mission1_1part',

default_ini.lua:
ini.startLocation="exp_mission1_1part";

loading.lua:
system.execute({
"iTimers.Start(1000, callback)",
})..."


Maybe there's a call to load the mission missing, which would replace the root menu call? I tried placing "iGame.Mission ()" under the timer start (do I need that timer?), but that gives the following error: "ErrorText 0 : engine_Execute error: ýëåìåíòà scene.exp_mission1_1part.unload íå ñóùåñòâóåò"

With Space Interceptor: Project Freedom I simply put a command line switch in the desktop link to launch a mission directly: ""C:\Program Files (x86)\Merscom\Space Interceptor\projectfreedom.exe" -mission mods/gm-survival/gm-survival.lua", but with DH it won't work (wishful thinking of universal rules for game launch parameters LOL)

Any ideas, Stu?


Top
 Profile  
 
PostPosted: Sat Apr 18, 2015 2:52 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
Unless you have created a new system there is no exp_mission1_1part, only exp_mission1. The system.execute bit has nothing to do with the error message. The game always loads a system in the background, normally just a completely empty system but like the Example mod in the SDK shows, you can load another system instead (The example mod removes the movie/static image so you can see the system in the background but it still shows the main menu).

Parameters only exist if they are programmed in.

P.S Like i said before don't change new.cfg, leave it alone. Its not a mod file (I'm not even sure if its actually used) but a global file.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Sat Apr 18, 2015 3:59 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
So if I understood you well: apart from the parameters you describe in your ReadMe documentation that comes with BruSDK, there are no other switches that would enable one to launch the game directly into a mission?

I tried "the lua way" of loading and starting automatically a certain mission with the correction you indicated (using "exp_mission1" instead of "exp_mission1_1part" ) changing the default_ini.lua to: ini.startLocation="exp_mission1" and removing the "iRootMenu.Open()" from loading.lua, but it results in a blank screen with background music playing.

I still think that (from a logical point of view) the root menu call should be replaced by a mission start call. But if this is so, then I haven't been able to figure out the right syntax for such a command... I've tried every single frasing I could think of, but none resulted in an automatic loading of the indicated mission... The best one I came up with was replacing the "iRootMenu.Open()" with "iGame.tGotoMission(1)", at the same time making sure that - as I learned from your EXAMPLE mod - the game would load the "ext_mission1" system as a default at startup, by changing the game.lua thus:

Sys2Loc = {
-- ["empty_system"] = "empty",
-- ["exp_mission0"] = "mission0",
["empty_system"] = "mission1",

Still, it would throw this error message: TBaseGameObject.Get error: objPath:->locations->system_grd_inst->scene->_G _id:mission1_1part Self.id:locations.

Could you suggest a correct syntax for "iGame.tGotoMission(1)" (or any other way of launching the game directly into a mission) to me?

I won't touch the new.cfg, I promise! ;)

P.S: Impatient and eager as I am, now that I've discovered "game modding", my new hobby :P, I've tried something different. I've made two new functions in game.lua:

-----------------------------------------------------------------
function iGame.StartArcade()
-----------------------------------------------------------------
iGame.LockResources=0;
for i,v in iDevices.Resources do
v.count = 10000
end
iGame.tGotoMission(ARCADE);
end

-----------------------------------------------------------------
function iGame.tGotoMission(ARCADE)
-----------------------------------------------------------------
engine_EnableRender(1)
iGame.Mission = 1
iGame.Submission = 1;
system.execute({
"toGame()",
})
end

And then I placed this call in loading.lua:

system.execute({
-- "iTimers.Start(1000, callback)",
-- "iDesktop.PlayLogoSequence(callback)",
-- "iDesktop.PlayMovie(iGame.IntroMovie, nil, callback, {BlackBackground=1})",
-- "iRootMenu.Open()",
"iGame.tGotoMission(ARCADE)",
})
end

...but still no dice. I admit, I do not have the knowledge (yet) to do these kind of things, because I don't know what half of the frases mean. But I had to try :D


Top
 Profile  
 
PostPosted: Sat Apr 18, 2015 7:38 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
BREAKTHROUGH!!!
XD

I don't know why or how, but suddenly I had an idea and tried this:

in game.lua I declared this function:


-----------------------------------------------------------------
function iGame.StartArcade()
-----------------------------------------------------------------
iGame.LockResources=0;
for i,v in iDevices.Resources do
v.count = 10000
end
engine_EnableRender(1)
iGame.Mission = 1
iGame.Submission = 1;
system.execute({
"toGame()",
})
end


and in loading.lua I inserted these lines:


system.execute({
"iGame.StartArcade()",
})


...AND IT WORKED! At least, the launching the game directly into a mission part did. Now I am in need of your scripting knowledge, because there's a "small" problem: my allies are hanging still, dead in space so to speak... And no enemies are being spawned... I guess that's got something to do with the game not loading certain mission scripts, but I've got NO CLUE why.

Could you ease me in the right direction, Stu?


Top
 Profile  
 
PostPosted: Sat Apr 18, 2015 8:31 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Alright... This one seems to be doing it (launching directly into a working game), albeit not very "fluently" (ship and space scene appears briefly, then disappears, then come back to stay)...

-----------------------------------------------------------------
function iGame.StartArcade()
-----------------------------------------------------------------
iGame.LockResources=0;
for i,v in iDevices.Resources do
v.count = 10000
end
engine_EnableRender(1)
iGame.Mission = 1
iGame.Submission = 1;
iLoading.Open({
id = iGame.Missions[iGame.Mission].Location,
mission = iGame.Mission,
submission = iGame.Submission,
part = 2,
onLoad = "toGame()",
})
-- system.execute({
-- "toGame()",
-- })
end


Again: any advice you can give me for "smoothing it out" will be greatly appreciated!


Top
 Profile  
 
PostPosted: Sun Apr 19, 2015 3:13 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
The Example mod is designed for Tarr so it uses different system names. The Root menu is just for displaying the menu. You don't want it to be open.

The reason it shows and then disappears is because the game loads a system and then your telling it to load the system again. I have tested and scripts are run by default but only the main system is loaded (Not the parts).

The game runs the following:
Code:
LuaScript.RunCommand('iLoading.Open({loadgame = 1, mission = 0, id = "'+playerSettings.curSave.value+'", onLoad = "'+gameIni.defaultinterface.value+'"})');

Which is missing the part information. You could however modify the ini.defaultInterface in default_ini.lua to:
Code:
ini.defaultInterface='toGame()", part = 1, onPreLoad = "iGame.PreLoadLocation()';


I havn't tested it but it should work. Part would need to be set to the mission part your code is in. I think part starts at 1 rather than 0.

The end result would be that the following is sent to lua by the game:
Code:
iLoading.Open({loadgame = 1, mission = 0, id = "'+playerSettings.curSave.value+'", onLoad = "toGame()", part = 1, onPreLoad = "iGame.PreLoadLocation()"})

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Tue Apr 21, 2015 5:35 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
Just randomly went to ModDB to look at the Tarr/DH bits and found out i can now edit the Dark Horizon one (Previously i couldn't, think they had the developer as the publisher or something). Found out they had it setup so no one could add a mod to the Dark Horizon section... fixed it.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Fri Apr 24, 2015 1:33 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
I'm writing from my wife's laptop. My mobo died on me so I'll be out of touch and inactive as far as modding is concerned for the next couple of weeks, until I get my replacement... That's the downside of living on a small island :(


Top
 Profile  
 
PostPosted: Sat Apr 25, 2015 8:07 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
cornel wrote:
I'm writing from my wife's laptop. My mobo died on me so I'll be out of touch and inactive as far as modding is concerned for the next couple of weeks, until I get my replacement... That's the downside of living on a small island :(


:(

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Fri Jun 05, 2015 12:10 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Okay, I'm back! My PC is up and running again. After ordering and changing my mobo twice, the repairshop decided it had to be the cpu that was failing. Once replaced, everything worked fine :) Still, two months (almost) without my very own little computer...

I'm gonna read up (and catch up) on my mod project (forgot half of it already...) and I'll be in touch!
:)


Top
 Profile  
 
PostPosted: Fri Jun 05, 2015 8:42 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Hi Stu! I did what you suggested (changing the ini.defaultInterface line in the default_ini.lua), and indeed, the system is not loaded twice anymore :) although now the "loading" screen appears and fades out twice before entering the game. Any ideas why this would happen?


Top
 Profile  
 
PostPosted: Sat Jun 06, 2015 1:43 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
cornel wrote:
Hi Stu! I did what you suggested (changing the ini.defaultInterface line in the default_ini.lua), and indeed, the system is not loaded twice anymore :) although now the "loading" screen appears and fades out twice before entering the game. Any ideas why this would happen?


DevMode's Load Mission uses:

Code:
function DevLoadMission(mission,mpart)
iRootMenu.Close();
iGame.Mission = mission;
iLoading.Open({id = iGame.Missions[iGame.Mission].Location, mission = iGame.Mission, part = mpart, splash = iGame.SplashScreens.Black, onPreLoad = "iGame.PreLoadLocation()", onLoad = "toGame()",})
end


I don't know if the splash part may be needed or not. The iLoading as far as i understand controls what image appears in the background.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Fri Jun 12, 2015 2:50 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Hello Stuart,
Just to let you know that hose double splash screen appearances at boot have been solved by some splash changes:
It was because I had the same splash screen for the initial and the mission launches...
;)


Last edited by cornel on Sat Jun 13, 2015 11:51 am, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group