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 3:42 pm

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: Sat Apr 11, 2015 7:23 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 don't know if it's important, but I noticed that, when compiling the mod, apart from creating the compiled folder with the mod's folder structure and the compiled modified lua files, it also created a duplicate of that same folder structure with the modified lua files, all inside a folder called "data", which was placed inside the data folder from the mod. Is this a normal behavior for BRUSDK?

Yes. Compiled folder is just the compiled lua files, its not used by the game at all. It does that basically for me so that i don't need to separate the lua files from the other files (Making releasing patches easier). The games use everything stored in the data folder.

With the actual game, it uses <YOURMOD>\data\interface\offgame\loading.lua but with the SDK the source code is stored as <YOURMOD>\interface\offgame\loading.lua . When you hit compile it shoves the lua in the correct locations.

Like i keep saying, the only way it won't load your modified code is if its not stored in the same directory structure as the game uses.

cornel wrote:
Any image viewer (for Windows 7) you would recommend to work with while modding?

I use Photoshop, it allows you to view the alpha channels.

cornel wrote:
I gave up on the whole intro movie skipping by means of the mod. It just won't work on my PC. So I've once again replaced the loading.lua in the game folder and now the intro movie will not play at game start, so that's okay I guess.

Its nothing to do with your PC. The game doesn't magically work differently based on the PC, it works very simply. When a lua file tries to include another file using the include command (or the engine_Include) it first tries to find the file in the mod folder, then it uses the games.

cornel wrote:
because hiding them by setting their visibility to zero won't work

Some panels are shown/hidden by the game when they are needed so moving them outside of the screen would be the only choice.

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


Top
 Profile  
 
PostPosted: Sat Apr 11, 2015 4:05 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Hmm... The mod folder structure really is the same as in the game folder. I checked that when you mentioned that the first time.


Wasn't such a bad idea then, moving those pannels outside of the screen? LOL I may be a modding noob, but I ain't so dumb, right? ;)


OH MAN!!! I would LOVE to play your free-roaming space mod!!! I probably wouldn't play the game itself anymore!!! (Just like what happened with Space Interceptor: Project freedom. I ended up just playing the only available mod for it, which is an open, infinite, endurance game.) But unfortunately the game crashes when starting your (unfinished?) mod :( giving an error log saying that:

General Info
------------
Application : Dark Horizon
Filename : dark_horizon.exe
Version : 1.0.8.0

Params : -MOD OEST
ParamCount : 2

System : empty_system
FPU State : pmSingle, rmNearest, exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision

Error Info
----------
ErrorText 0 : TBaseGameObject.Get error: objPath:->scene->_G _id:exp_mission1 Self.id:scene

Exception : None
GetLastError() : The operation completed successfully.


LUA Debug
---------
Debug 3 : Source: iTimers.Stop(1) iLoading.Seq(4)
: What: main
: NameWhat:
: LineDefined: 0
: CurrentLine: 1
Debug 2 : Source: @D:\delphi\Tarr\Game_DH\Compiled\interface\offgame\Loading.lua
: What: Lua
: Name: Seq
: NameWhat: field
: LineDefined: 199
: CurrentLine: 346
Debug 1 : Source: @D:\delphi\Tarr\Game_DH\Compiled\scripts\funcs\system_funcs.lua
: What: Lua
: Name: setVar
: NameWhat: global
: LineDefined: 70
: CurrentLine: 71
Debug 0 : Source: =[C]
: What: C
: Name: engine_SetVar
: NameWhat: global
: LineDefined: -1
: CurrentLine: -1

I even did a clean re-install of the game, just to be on the safe side, but still no luck... Any thoughts?


Top
 Profile  
 
PostPosted: Sat Apr 11, 2015 4:28 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:
Hmm... The mod folder structure really is the same as in the game folder. I checked that when you mentioned that the first time.

Well as long as its got your changes in it and its placed in the right location it will work.

cornel wrote:
OH MAN!!! I would LOVE to play your free-roaming space mod!!! I probably wouldn't play the game itself anymore!!! (Just like what happened with Space Interceptor: Project freedom. I ended up just playing the only available mod for it, which is an open, infinite, endurance game.) But unfortunately the game crashes when starting your (unfinished?) mod :( giving an error log saying that:

Like i said, the project didn't go far as i started working on a system editor (Well viewer). It doesn't really do anything. You likely need to switch maps using devmode and the Load Mission button (The two numbered boxes above it are the mission and part numbers). I think i modified the systems to remove the lua code that does all the mission stuff (Spawning enemies, giving objectives etc).

Iv made progress on using Hammer for the systems. Managed to convert a model to a MDL file that hammer uses(It doesn't export texture information as its just for reference):
Image

Still need to write code to export the relevant information from a System's CM file to the format Hammer uses.

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


Top
 Profile  
 
PostPosted: Sat Apr 11, 2015 6:13 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Opening the image files with Photoshop still only showed me white rectangles... I guess I'm a lost cause fro modding :(

Well Stuart, you may think me crazy (maybe I am... a bit) but since hearing about your OEST project, which is (almost) exactly what I want, I've GIVEN UP on modding (too much to learn, too much time to get it right) and have decided that I'll ONLY play DH or TC again... ever... if it's with your free-roaming mod!!! How's that for LOCO?

So... (here comes the million dollar question...) any chance of you finishing your mod?

Or would it be easier (and quicker) for you to make an "endurance" mod (endless waves of enemies for dogfighting) like the one that was made for Space Interceptor?

Here's hoping ;)

P.S.: For anyone wanting to mod these games, have a look at this too: https://springrts.com/wiki/Lua_Beginners_FAQ

Huge thanks for all your help, Stu! And you can rest easy now: no more stupid noob questions from me anymore :D


Top
 Profile  
 
PostPosted: Sat Apr 11, 2015 10:16 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:
Opening the image files with Photoshop still only showed me white rectangles... I guess I'm a lost cause fro modding :(

With photoshop you have to enable the alpha channel. By default it will only show the RGB channels.

Image

You just need to read some tutorials. If you give up easy you will never learn.

cornel wrote:
So... (here comes the million dollar question...) any chance of you finishing your mod?

I wouldn't hold your breath. I havn't got alot of time to do modding when i also maintain stuff. Its also a very ambitious project.

cornel wrote:
Or would it be easier (and quicker) for you to make an "endurance" mod (endless waves of enemies for dogfighting) like the one that was made for Space Interceptor?

I won't be making anything like that. But it technically shouldn't be hard. You would just need to find a level which has spawning enemies near the start and just modify the mission. The way the missions work is that there are points in the system that you can use as a reference for spawning enemies/allies/etc. There is some missions where enemies spawn multiple times before you carry on, so modifying the code to do a constant loop wouldn't be hard.

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


Top
 Profile  
 
PostPosted: Sat Apr 11, 2015 10:58 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Damn! You're making it sound so easy... and the reward of an endurance mod would be awesome... I dunno... I doubt I'l ever be able to pull this off by myself, and I feek bad asking you what to do next at each and every step I get stuck... I've read all your tutorials and documentation and your (and others') posts on several forums and general lua tutorials... but I'm a bit overwhelmed I'm afraid. I don't know the first thing about scripting, no background whatsoever in that department. So I may not be the ideal guy for the job... No, I said that wrong: I'm definitively not the right guy. But maybe someone is reading all this... and does have the necessary know-how and time... and is in need of a hobby anyway...
Again: here's hoping :)

You're right of course: if you give up easy, you'll never get things done. It's just that I have an awful lot on my hands right now (urgent house repairs, starting up a business, kids...) and my energy is lacking...


Top
 Profile  
 
PostPosted: Sat Apr 11, 2015 11:45 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:
Damn! You're making it sound so easy...

An example.

If you modify TC\systems\m1_system_anterra\locations\mission1_1part\scripts\startscript.lua from:
Code:
onDestroyed='defOnDestroyed(tmp[1]) loc.Destroy1Wave()',

To
Code:
onDestroyed='defOnDestroyed(tmp[1]) loc.Spawn1Wave()',


It should in theory keep doing loc.Spawn1Wave() over and over. Note that if im correct when you kill one of the enemies it should spawn more (I think OnDestroyed is called for every ship). If you wanted it to only spawn new enemies when the entire wave was killed you would need to create a new function which counted when enemies were killed and when it reached 3 to call the loc.Spawn1Wave() . There is similar code elsewhere in the file for reference.

cornel wrote:
I feek bad asking you what to do next at each and every step I get stuck...

Why? I can always ignore you if i wanted to :wink:

cornel wrote:
I don't know the first thing about scripting, no background whatsoever in that department. So I may not be the ideal guy for the job... No, I said that wrong: I'm definitively not the right guy. But maybe someone is reading all this... and does have the necessary know-how and time... and is in need of a hobby anyway...
Again: here's hoping :)

Well a background using LUA wouldn't help alot. You need to learn how the game does things more than LUA basics. Most of the stuff is Game Engine related and not in LUA's specification. If you look through the startscript.lua's you will find that 99% of the code is specific to Tarr/DH's lua code (I.E loc.timer() is a specific thing only found in Tarr/DH, it executes a bit of code after a specified interval).

cornel wrote:
You're right of course: if you give up easy, you'll never get things done. It's just that I have an awful lot on my hands right now (urgent house repairs, starting up a business, kids...) and my energy is lacking...

RedBull gives you wings.

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


Top
 Profile  
 
PostPosted: Sun Apr 12, 2015 12:55 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
You're the best!

LOL :P


Top
 Profile  
 
PostPosted: Mon Apr 13, 2015 1:21 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 4994
Location: UK, Scotland
I managed to export to Valves Hammer, but it doesn't like maps larger than 32000 in size (The Source engine is considered an Indoor Engine so its maps are never massive in size even though they do outside scenes as well) so i will need to scale everything. Also the model sizes can vary from being extremely small like the asteroid field models to massive like some ships, the game controls there size in the map (So for models that can be exported to the mdl format i will have to scale them based on the average scale used in the maps. Not all models can be exported due to the limitations on the amount of surfaces a model can have).

The hard part however will be shoving it back into a format the game can read (Not everything in the files is actually used by systems, there is also things like Parent Name's that are never used by anything as geometry in maps never has a parent or child). With all the necessary information.

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


Top
 Profile  
 
PostPosted: Wed Apr 15, 2015 10:52 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
So I had a quick look, but there is no mention of loc.Spawn1Wave in any of the Dark Horizon's startscript luas...
:(


THX anyway
:)


Top
 Profile  
 
PostPosted: Thu Apr 16, 2015 6:09 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:
So I had a quick look, but there is no mention of loc.Spawn1Wave in any of the Dark Horizon's startscript luas...
:(


THX anyway
:)


It depends on the mission as to what they called it. Its the same concept. When the ships are destroyed the OnDestroyed is called. You just make it point to the same function as the one that creates the ships.

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


Top
 Profile  
 
PostPosted: Fri Apr 17, 2015 3:14 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
I don't believe it... I've done it! I've got an endless dogfighting game!!! THANKS TO YOUR GUIDANCE, MY MASTER! ;)

Couple of doubts (yes, now I want more: as in perfectioning my mod):

- what means "loc.setPEFE(loc.pgroup,50)" ?
- is the 1 after the timer a measure of time? "loc.timer(1,'loc.onPeaceMusic()');" ...in minutes perhaps?
- what does "loc.moveToHelper(loc.pgroup,"2en");" mean?
- and "ingame.setPlayerShipAttackersCount(1);"?
- what do the 3 and the 7000 mean in this line: "gr.spawn(loc.en1,'scout_fighter',3,'pre_gen:1en','loc.moveToHelper({engine_GetId(tmp[1])},"1en",7000)');" ?

Again, my apologies for the many questions...


Top
 Profile  
 
PostPosted: Fri Apr 17, 2015 8:41 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 don't believe it... I've done it! I've got an endless dogfighting game!!! THANKS TO YOUR GUIDANCE, MY MASTER! ;)

:)

cornel wrote:
- what means "loc.setPEFE(loc.pgroup,50)" ?

Code:
------------------------------------------------------------------------------
loc.setPEFE=function(ships,pe)  ---óñòàíàâëèâàåò p_engine è force_engine ó ñïèñêà êîðàáëåé
------------------------------------------------------------------------------
  for nship,ship in ships do if isObj(ship)==1 then
    setShipParamVar(ship,"p_engine","cur",pe)
  end end
end

It looks like it sets the current speed of ships in the loc.pgroup to 50.

cornel wrote:
- is the 1 after the timer a measure of time? "loc.timer(1,'loc.onPeaceMusic()');" ...in minutes perhaps?

I think its in seconds.

cornel wrote:
- what does "loc.moveToHelper(loc.pgroup,"2en");" mean?

It makes ships in loc.pgroup move to 2en. 2en is a point in the map. If you goto the directory where you installed the SDK, goto Tools and run SystemEd you will be able to get a list of all the points in each system. SystemEd was never finished and isn't all that useful which is why its not linked to from the BRUSDK.exe . It may be the pre_gen: ones in the geometry bit. Note that the main system cm will not hold them, it will be one of the part ones.

cornel wrote:
- and "ingame.setPlayerShipAttackersCount(1);"?

When the AI ships are looking for a target, if the player is in range and the player is targeted by less than the value you set, then it will change targets to the player.

cornel wrote:
- what do the 3 and the 7000 mean in this line:

3 is Quantity. So it will spawn 3 ships.
Code:
gr.spawn=function(grId,classId,quan,helperId,action,_fx)

7000 is the maximum range from the "Helper" or Anchor point. The way the game works is that all of the AI ships will fly around an Anchor point. The movetohelper changes the ships anchor point, so if the ships outside of the range of its anchor it should fly towards it.

cornel wrote:
Again, my apologies for the many questions...

If you don't ask you don't get.

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


Top
 Profile  
 
PostPosted: Fri Apr 17, 2015 10:26 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Is there a verb list or dictionary for the lua codes used in DH and TC, so that I don't need to bother you with all these questions?
If not, then:


What does "loc" mean?


Is "pgroup" = player group, as in: me and my wingmen?
And is the speed expressed in percentage (50, 100, etc.) or is there a scale?
Are these my wingmen: "loc.pgroup = {"1pg","2pg","3pg"};" and can I add as many as I want?


This I did not understand: "When the AI ships are looking for a target, if the player is in range and the player is targeted by less than the value you set, then it will change targets to the player." Could you elaborate a bit? What would happen in the game if I change the value to 2?


How can I launch the game directly into a mission (the one I modded, of course ;)
This does nothing...
system.execute({
"iTimers.Start(100, callback)",
"iGame.Missions.exp_mission0 ()",
"iGame.Missions.exp_mission0_1part ()", ...and can I leave out the timer?


I couldn't do much with SystemEd, I'm afraid. Clicking on the files in the navigation pane on the left doesn't sem to show anything on the right...


Top
 Profile  
 
PostPosted: Fri Apr 17, 2015 2:36 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:
What does "loc" mean?

I guess location. Its just what they used, you technically could call stuff bob in your code.

cornel wrote:
Is "pgroup" = player group, as in: me and my wingmen?

pgroup is a variable. Its defined in the startscript.lua . I don't know which mission your looking at so i don't know what it references.

cornel wrote:
And is the speed expressed in percentage (50, 100, etc.) or is there a scale?

I don't know, i guess its the actual speed but i have no clue.

cornel wrote:
Are these my wingmen: "loc.pgroup = {"1pg","2pg","3pg"};" and can I add as many as I want?

Thats where pgroup is defined. I would need to know which mission your looking at.

cornel wrote:
This I did not understand: "When the AI ships are looking for a target, if the player is in range and the player is targeted by less than the value you set, then it will change targets to the player." Could you elaborate a bit? What would happen in the game if I change the value to 2?

If its set to 2 then only 2 AI ships can target the player.


cornel wrote:
How can I launch the game directly into a mission (the one I modded, of course ;)

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()",
        })



cornel wrote:
I couldn't do much with SystemEd, I'm afraid. Clicking on the files in the navigation pane on the left doesn't sem to show anything on the right...

Like i said it doesn't do alot but it can tell you the names of things in the mission in the navigation bit.

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


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:  
Powered by phpBB® Forum Software © phpBB Group