Plasma weapons

Plasma (i.e.Pulse) weapons; support/discussion/questions

Moderator: thunderchero

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 731
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble » Wed Oct 28, 2009 2:35 pm

All my attempts failed. :(

I got some strange results like the ships self become pulse animations. This indicates its possible. What we need is phaser/plasma trajectory i.e. fired from hardpoints (& plasma speed) but with graphic independence of a torpedo. But even if we hack the whole (968 bytes per 3D-object!) data-stack and insert torpedo code, we'd probably loose the trajectory from the phaser hardpoints.

So back to the old plan:
thunderchero wrote:check them out tell me what you think.
Thanks thunderchero, good to see that it works at all. :)

1.) I think in-game animation is still too large -> larger than torpedoes. So maybe reduction to 1/3 of current size. Better a bit too small and look OK then clearly visible. This also could hide some other errors (missed shot issue).

2.) colors & shape - I'd prefer a clear sphere(no torpedo-like aureole) and more blaze of colour. Here are some inspirations for colours (aside of plasma_2.gif itself):

http://www.trekmeshes.ch/news.php
http://www.starshipdatalink.net/operations/weapons.html
http://ngdhstech.com/student/61870/CSS/Images
http://www.tutorials.de/forum/attachmen ... -laser.jpg
http://www.ccdump.org/systemsdisplay.as ... Disruptors

thunderchero wrote:sound is working and on avi (pluse phaser sound)
I only hear standard phaser sound. Did I misinterpret you replaced sound?

thunderchero wrote:Just wait til DCER finds out UE will need more stats for plasma weapons. :wink:
Shouldn't be much of an issue. It's just a single value (same as "behave as if built by").
We don't use the shiplist plasma stats due to a couple of issues. :?

jigalypuff wrote:do you mean the drone weapon i made for the sg mod? If so I`ll mail it to you in a bit :)
Yep, but nevermind, it won’t help either. Just out of curiosity, is there same direction problem with, if viewing from target?


Off-topic, but does anybody know purpose of scar1.hob?
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6075
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Wed Oct 28, 2009 2:55 pm

Spocks-cuddly-tribble wrote:All my attempts failed. :(

Off-topic, but does anybody know purpose of scar1.hob?
My attempts failed as well :x

I have even attempted useing hphoton.hob as hphaser.hob (renamed) with same results. So code for trajectory must be missing or still unfound in trek.exe. I thought it might be part of hphaser.hob but was wrong. I even played with some of the code in trek.exe and got it to display straight with model but did not move lol. even got it to diplay in center of combat zone (sideways). :? I also created a full 3D model with all same results.

EDIT; I have even gone back and used all 3 versions of *phaser.hob that microprose released 1.0.0, mp patch, 1.0.2 all were different in size (kb). But each version each race used different size files (2 per version) and have not tried all of them. Still not sure why this is done. :?

The scar1.hob is only used by vanilla models, once they are damaged the scar will appear on model until it is destroyed. I think the first explostion must happen before they will appear. Each model has so many point for this. No one has gotten this to work on new models. Also starbases use a special gif (d*s_b.gif) instead of scar1.hob.

thunderchero
Last edited by thunderchero on Wed Oct 28, 2009 3:15 pm, edited 1 time in total.

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 731
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble » Wed Oct 28, 2009 3:14 pm

thunderchero wrote:So code for trajectory must be missing or still unfound in trek.exe.
Actual that's not the problem (trajectory is OK), but plasma has no own 3D entry in that 968 bytes data stack (uses same entry as the firing ship afaiks). Each torpedo has its own entry as it seems. So my guess is some 3D data is missing. Or, as you said, it's just a plasma hob error which we don't understand.
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6075
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Wed Oct 28, 2009 3:23 pm

I just had an Idea, But could be way off on this.

from code in trek.exe it looks like a switch, phaser or plamsa. Could the switch be given to torpedoes or plasma?

The reason I ask, when you pause battle playback, torpedoes stop when paused (solid object) while phaser continue to target same is true with plasma.

EDIT; I just did a test renaming my 3D plasma.hob I made to hphoton.hob it is backward (wrong orientation) but stops when paused and can rotate around object and is veiwed correctly from all angles. So I will create a new model more the shape as you suggested.(same shape front and back) I hope my suggestion above is possible. this might work.

thunderchero

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 731
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble » Wed Oct 28, 2009 6:41 pm

thunderchero wrote:Could the switch be given to torpedoes or plasma?

The reason I ask, when you pause battle playback, torpedoes stop when paused (solid object) while phaser continue to target same is true with plasma.
In theory this could be done. But it means really much coding work(not realistic) and, as I said, we'd loose phaser trajectory(not intended). Btw solid object = own data stack entry:
Spocks-cuddly-tribble wrote:even if we hack the whole (968 bytes per 3D-object!) data-stack and insert torpedo code, we'd probably loose the trajectory from the phaser hardpoints.
thunderchero wrote:So I will create a new model more the shape as you suggested.(same shape front and back) I hope my suggestion above is possible. this might work.
I think you misinterpreted me(this was a note for torpedo usage only - not for plasma!). So I'm afraid you'll just waste your time. Sorry. :(
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6075
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Wed Oct 28, 2009 6:54 pm

Spocks-cuddly-tribble wrote:In theory this could be done. But it means really much coding work(not realistic) and, as I said, we'd loose phaser trajectory(not intended). Btw solid object = own data stack entry
why would we lose phaser trajectory I would think it would be using photon trajectory at that point?

Also when getting image below, object is not solid like ships are when rotating around I could go inside of torpedeo but can not do this with ships.
Spocks-cuddly-tribble wrote:
thunderchero wrote:So I will create a new model more the shape as you suggested.(same shape front and back) I hope my suggestion above is possible. this might work.
I think you misinterpreted me(this was a note for torpedo usage only - not for plasma!). So I'm afraid you'll just waste your time. Sorry. :(
thats a shame about code.

as for new photon hob it could still be used as torpedeo.

here is first attempt texture is very plane.

Image

thunderchero
Last edited by thunderchero on Tue Aug 24, 2010 12:38 pm, edited 3 times in total.

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 731
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble » Thu Oct 29, 2009 7:42 am

thunderchero wrote:why would we lose phaser trajectory I would think it would be using photon trajectory at that point?
Because we don't know how to create an own entry for plasma objects. So using torpedo code, it would fire/start from ship position (centerpoint, not hardpoints) and with a linear trajectory.

phaser/plasma = dynamic trajectory -> therefore linkage to the ship 3D-object entries = insufficient(or misinterpreted?) display info for plasma object.
thunderchero wrote:Also when getting image below, object is not solid like ships are when rotating around I could go inside of torpedeo but can not do this with ships.
It's interpreted in different ways (ship HOBs renamed/used as torpedo show only backside of ship due to trek.exe code), but it has it own internal data enty (complete data for position, vector, viewing angel...)
I just took the term "solide" from your example above.


Since we don't know underlying data, some is just speculation. So if you spend months of daily work by try & error coding, maybe you’ll get it to work. :)
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 » Fri Feb 12, 2010 4:04 pm

are you saying when plasma is fired it track the target?

User avatar
Weirdness
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 51
Joined: Mon May 19, 2008 2:00 am
Location: Shilo, Mantioba, Canuckistan

Post by Weirdness » Mon Mar 01, 2010 3:19 pm

Tethys wrote:Watch DS9 episode "The Die is Cast" where the Tal Shiar and Obsidian Order attempt to kill the founders homeworld. :)
Missed that episode, and I see your point.
Say no to drugs... Narcotics are better!!!

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 731
Joined: Sun Apr 27, 2008 2:00 am

Re: Plasma weapons

Post by Spocks-cuddly-tribble » Thu Nov 10, 2011 4:14 pm

I was hoping to continue this project, but it would take away too much time from other projects. Anyways, here is an initial analysis.

The problem:

Plasma animationa are just a child animations of ships, basically using phaser code. Unlike a torpedo, a plasma-'bolt' has no own ds:597864 entry (see below) nor a real position or trajectory (the plasma-bolt chases moving targets, even into warp) . The animation just shows a cosmetic pseudo trajectory based on the fired weapon slot & target position and a pseudo position based on the system time. But for an approximately correct display in all tactical camera object views (wrt alignment & scale) BotF apparently needs code for a missile aka torpedo.

Knowing about object codes and plasma marker, I activated / manipulated some unused plasma code resp. changed switches to use torpedo / phaser code - without significant results.

- Plasma switches:

sub_49E110
0049E304 cmp dword ptr [ecx+4], 2 // phaser only switch to sub_4A1420

sub_49FBC4 object switch -> case 2 phaser, case 3 plasma (see below ds:5CAEC8 +4)
0049FC49... (vs. sub_4A1210 phaser code with VTX reference)

sub_4A07A0
004A07B8 cmp edx, 2 // phaser only switch to sub_4A1210
a test sharing torpedo code with plasma = plasma zoom out scale a bit better
004A07D1 83FE 04 CMP ESI,4
004A07D4 0F8C 37010000 JL 4A0911

sub_4A0B10
004A0B25 cmp dword ptr [eax+150h], 0 // ship slot +10h = plasma switch marker
004A0B32... plasma target code (behaves just like phaser code sub_ 4A1210)


- Some relevant files & code keys:

Please aware that some information is speculative/incorrect, since these are just hasty written (& partially outdated) notes.

The most important file in combat is ds:597864, containing entries for each ship, station & monster (-> value locations are confusing due to unneeded displacements) AND for each torpedo!

-> ds:597864 (3C8h per object) set in sub_520D7 (most addresses apply only to ships -> ship/station/monster displacement)

+38h 1 = cloaked
+58 bitmask or1=cloaked cf. +20C ?
+0EC 0 = uncloaked
+14C agility?
+15C Scale set by 3D
+178 object type 1=ship / 5=station / 6=torpedo / 7=monster
+188 fed fer ship stuff ?
+1A4 in tactical combat ds:[5CAEC8] 3D entry
+1B0 or1 = torpedo & skip all? / or2=no shields?
+1B4 for torpedo -> 0xFFFFFFFF / ships start Gshiplist?
+1B8 for torpedoes 3C8h entry of firing ship
+1DC owner race ID
+1EC Shield Strength
+1FC given command
+206 shiplist.sst ID (for stations at +1E2)
+20C or 10h = lock weapons (or 1 = cloaked)
+228 plasma minimum distance?
+230 plasma max range
+25C plasma accuracy (+beam EPs)
+260 plasma shots
+264 plasma Multiplier
+268 plasma damage
+26C plasma Shield Penetration
+270 [4 - exp level] * 65536 / plasma shots
+280 min distance phaser?
+288 max distance phaser
+2B4 beam accuracy (+beam EPs)
+2B8 phaser shots
+2BC beam multiplier
+2C0 beam damage
+2C4 shield penetration?
+2C8 [4 - exp level] * 65536 / phaser shots
+2D0 phaser 3D sfx entry set marker (plasma +278)
+308 torpedo accuracy
+30C torpedo shots
+328 current Shield Strength
+32C nominal Shield Strength -> if nebular set to 0 -> +2D4 monster +2BC station
+330 shield level
+334 Shield Recharge
+338 current hull points
+33C nominal hull
+340 defense
+344 damage control
+358 Build Cost
+35C 2 = cloaked (ship -> +304 monster)
+390h -> or 2 = lock shields (due to cloak)
+3BC =100dec
+3C4 ability bitmask (3th bit /4 = command, 4 /8 cloaked fleet?, )


The most important 3D sfx file is ds:5CAEC8, containing entries for each object, regardless if shown/used or not.

-> ds:[5CAEC8] 3D data 170h per object (address set in ds:[597864]+1A4 for ship/station/monster/torpedoes)

+4 object code:
0 ship/monster (& station in tech screen/screensaver), 1 photon, 2 phaser, 3 plasma, 4 explosion, 5 shields, 6 station, 7 stellar object, 8 scar & Gomtuu effect (wkk.hob)
+24 a scale float * exe scale ?
+44 -1 or object index -> ds:602B6C(2bytes/entry) -> ds:602B60(98h bytes/entry) child animations
+48 address of a list for weapons?
+4C shields stuff?
+70 shields stuff?
+7C a float
+98 scale (=hob*exe)
+9C object index flag -> skip if 0
+A0 an object code ?
+A4 0,2,3,5
+A8 system_time_milliseconds
+BC damage ratio
+C0 attacker entry for beams
+C8 target entry for beams
+100 ship entry for shields
+10C -> skip if 0
+118 cmp system_time_milliseconds
+120 attacking weapon entry for shields
+124 -1 or 1
+12C -1 remove object marker
+13? a float * -0.5 +1
+140-170 trek.exe slot for shiplist.sst objects
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2546
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Plasma weapons

Post by Flocke » Thu Nov 10, 2011 5:32 pm

interesting stuff, but I think rendering replacements based on photon.hob/phaser.hob file names as identifier would be an easier approach. ;) ;)

Post Reply

Return to “Plasma (i.e.Pulse) weapons”

Who is online

Users browsing this forum: No registered users