Homesource Forums

Homeworld Source Editing Talk
It is currently Tue May 30, 2017 4:07 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Feb 27, 2007 12:14 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 14, 2004 12:41 am
Posts: 326
Another bug that's hung around a while. Like standard ships, derelicts have an explosion assigned to them to be used when they are destroyed. This applies only to the discarded r1 ship designs in Karos, I believe.

But now the derelicts just quietly disappear.

I will look up as to when they actually went missing.

As to why the debris demolition: In Missions 02, 03, and 13 destroying the debris can get you access to dust clouds otherwise obstructed by the wreckage.

Be patient or use modded ships. As Derelicts are meant as decoration or obstacles or both the larger pieces tend to have insane hit points.

(Optional: But all debris should generate an explosion, yathink?)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 2:18 pm 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.

I've been hunting through the code trying to find the explosions, and found out a few things.

There doesn't seem to be any derelict explosions referenced in the code anymore apart from three.

Below is the list for all derelicts from ObjTypes.h

Code:
typedef enum
{
    AngelMoon,
    AngelMoon_clean,
    Crate,
    FragmentPanel0a,
    FragmentPanel0b,
    FragmentPanel0c,
    FragmentPanel1,
    FragmentPanel2,
    FragmentPanel3,
    FragmentStrut,
    Homeworld,
    LifeBoat,
    PlanetOfOrigin,
    PlanetOfOrigin_scarred,
    PrisonShipOld,
    PrisonShipNew,
    Scaffold,
    Scaffold_scarred,
    ScaffoldFingerA_scarred,
    ScaffoldFingerB_scarred,
    Shipwreck,
    //pre-revision ships as junkyard derelicts:
    JunkAdvanceSupportFrigate,
    JunkCarrier,
    JunkDDDFrigate,
    JunkHeavyCorvette,
    JunkHeavyCruiser,
    JunkIonCannonFrigate,
    JunkLightCorvette,
    JunkMinelayerCorvette,
    JunkMultiGunCorvette,
    JunkRepairCorvette,
    JunkResourceController,
    JunkSalCapCorvette,
    JunkStandardFrigate,
    //junk derelicts
    Junk0_antenna,
    Junk0_fin1,
    Junk0_fin2,
    Junk0_GunAmmo,
    Junk0_panel,
    Junk0_sensors,
    Junk1_partA,
    Junk1_partB,
    Junk1_shell,
    Junk1_strut,
    Junk2_panelA,
    Junk2_panelB,
    Junk2_panelC,
    Junk2_panelD,
    Junk2_shipwreck,
    Junk3_Boiler,
    Junk3_BoilerCasing,
    M13PanelA,
    M13PanelB,
    M13PanelC,
    //hyperspace gate dummy derelict
    HyperspaceGate,
    NUM_DERELICTTYPES
} DerelictType;


If you inspect the contents of Homeworld.big you find a file called general.script in the etg folder. Within this file are nine lines of code starting on line 373.
Code:
setDeathEvent           PrisonShipnew, damage, DestPrisonShip.ebg
setDeathEvent           PrisonShipnew, projectile, DestPrisonShip.ebg
setDeathEvent           PrisonShipnew, beam, DestPrisonShip.ebg

setDeathEvent           Crate, damage, DestDamageSmall.ebg
setDeathEvent           Crate, projectile, DestDamageSmall.ebg
setDeathEvent           Crate, beam, DestDamageSmall.ebg

setDeathEvent           HyperspaceGate, damage, DestBeam.ebg
setDeathEvent           HyperspaceGate, projectile, DestBeam.ebg
setDeathEvent           HyperspaceGate, beam, DestBeam.ebg


These lines only load the explosion events for three of the derelicts.
Are we sure that the explosions were in the original game?

Everything else defaults to 0, or null so it doesn't attempt to display any explosions.

So what to do?

We cannot directly modify anyone's bigfile, so do we hardcode the explosions?
Should we include a routine to process an additional file for the explosions?
Can the existing routines to override the bigfile be used in this instance?
Any other suggestions, or are the derelicts supposed to be devoid of explosions?

Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 3:52 pm 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
aunxx wrote:
We cannot directly modify anyone's bigfile, so do we hardcode the explosions?

No, don't do that - we need to undo as much hardcoding as possible. I've been meaning to create HomeworldSDL.big and integrate it into the file lookup code but I've yet to have something really worthwhile to put in it and I've been distracted by the whole file overriding mechanism.

Anyway, my vision as to how this will work is that the repository will have a (root level source) directory called Homeworld.big into which we place updated/fixed files. It should only be updated files though, primarily so we don't fall afoul of piracy via content distribution but also for space reasons. Homeworld SDL, the game, will read files in the following order:

- (mod directory - not yet available)
- user set environment variable path (local filesystem ".big" directory structure)
- hardcoded platform default path (local filesystem ".big" directory structure)
- HomeworldSDL.big
- Update.big / OEM_Update.big (this could be a bit tricky and I won't know exactly how this will work until I look at it a bit closer)
- Homeworld.big
- current directory (music/speech files etc - I'm not entirely happy that you can't override these but that's not a battle I envisage having to fight any time soon...)

We would then distribute HomeworldSDL.big as part of our releases. It can either be distributed as a real .big file or just as a raw directory structure, whichever is easier for you to do - the file lookup code shouldn't care.

aunxx wrote:
Code:
setDeathEvent           Crate, damage, DestDamageSmall.ebg
 ...
setDeathEvent           HyperspaceGate, beam, DestBeam.ebg

DestDamageSmall.ebg and DestBeam.ebg are fairly generically named so hopefully these could be applied to anything we wanted. Presumably they differ markedly in scale which, from our point of view, is rather handy. I'm not sure if the fact these are both multiplayer game related tells us anything important or not...

I've yet to actually find a derelict I could actually destroy but then I haven't looked into it much either. Can anyone recommend any to which we can assign the above effects to see what they look like?

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2007 3:56 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
lmop wrote:
aunxx wrote:
We cannot directly modify anyone's bigfile, so do we hardcode the explosions?

No, don't do that - we need to undo as much hardcoding as possible.


Agreed. Was just an "This is one of the options available to us, no matter how stupid it is" suggestion. :) :)

I'm very entertained by the idea of us having a HomeworldSDL.big file. I think that's an excellent idea. :D

I have been trying to find a derelict to destroy for some time, and eventually found one on level 13.
Once I'd found something to destroy I could start trying to fix this problem.
There is a JunkHeavyCorvette down and to the left (looking forward over the mothership) from the starting point on level 13. Hopefully you should have a save near there, or alternatively I believe there's a shortcut to jump to whatever level you want.

I can and have kludged the code to get explosions, so I know that modifying the scripts will work.

Unless anyone has any other suggestions I'll leave this until we have completed the file access to lmop's specification.

lmop, let me know if there's anything you think I can help with.

aunxx.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 18, 2007 1:25 am 
Offline
Site Admin
User avatar

Joined: Tue Dec 14, 2004 12:41 am
Posts: 326
lmop wrote:
I've yet to actually find a derelict I could actually destroy but then I haven't looked into it much either. Can anyone recommend any to which we can assign the above effects to see what they look like?


Example: in Mission 02 there is a dust cloud placed amidst the wreckage of the Khar Selim. Of course exact dust cloud placement etc is generated anew each time the mission is started but usually resourcers will abort going after that cloud because the debris in close proximity leaves no clear path to the cloud...
... but the two closest bits of debris are two small panels of the type 'Junk0_panel'.

So destroying those two items of debris usually will allow you to coax a resourcer close enough to snag the cloud. The only thing standing in the way is this:

Junk0_panel.shp
Quote:
maxhealth 80000


If removing the two closest panels isn't enough then the other debris in close proximity to the cloud has hit points of 800000 apiece.

In Mission 03 the tumbling wreckage of the scaffold sometimes has a dust cloud placed too close to it for the resourcer to get it. The tumbling bit is actually two pieces of wreckage locked together with 800000 health each...

It takes time to do it, but all debris can be destroyed. Souped-up weapons are a great help, but because weapons hit effects are scaled to the damage of each weapon it can get a little overwhelming and any debris explosions would be hard to see according to N&N.

But ya gots to do it because in SP mode time is cheap and dustclouds are scarce ;)

... and more seriously: we should be able to make things blow up if they're in the game, right? :twisted:


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 18, 2007 1:31 am 
Offline
Site Admin
User avatar

Joined: Tue Dec 14, 2004 12:41 am
Posts: 326
I've regarded a custom big file for HWSDL as pretty much inevitable, esprcially as we'll need custom .fib files to even give folks access to the new options we hope to put in.

And the game should be able to just generate an explosion whenever an explosion type is specified in a .shp file... dontchathink? ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


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