Author Topic: Turret and Physical Subsytem prefab library/import in pcs2  (Read 2115 times)

0 Members and 1 Guest are viewing this topic.

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Turret and Physical Subsytem prefab library/import in pcs2
i have an idea. i spent a few minutes the other day cleaning up files on my computer, when i stumbled on my quake map folder. i decided i wanted to go through some of the maps and see which ones i wanted to keep and which were just throways. so i load the maps into qoole and i notice a feature for prefab import that i never noticed before. q2 maps supported turrets and i had made about a dozen or so of them. in q2 turrets were a ***** to setup correctly and almost never looked right, so when you got one that worked you made a prefab of it and add it to the library. once that was done i could quickly import 10 of them by clicking on a button for each one and clicking where i wanted it to go. and thats where my idea came from.

apply a similar prefab library system to pcs2. so you could have a subsystem import tool, select a turret, and click on the hull somewhere and have it setup fvec, and uvec for you automatically. the turret itself would be loaded from a pmf file and would be stored in a known orientation and completely setup. the turret and all its information would be transformed to match the poly normal (which would be uvec) and aligned to any desired direction (fvec would face mouse curser and lock into place at mousedown). i think this could really allow for rapid changes in ship armament, and be a really badass time saving feature. it could also apply to physical subsystems so you could have doodads you can place on the hull and would configure them as a subsystem for you.

to break it down this would involve


1: library (could just be a directory in pcs2) that you could place prefab turrets and subsystems into. prefabs would assume xz placement with +y being up (turrets would be configured as top-placed retail turrets), and geometry would be centered at 00 on xz and 0y would be assumed to be the "floor". you may also need a dummy hull objet which would be discarded on import
2: placment utility, which would be similar to squad logo placement,  which would project a fake turret (could just be a basic wireframe) base onto the hull and match the polygon normal closest to its center to calculate its normal, once placed you could then set the fvec with a second click, this also calculates position
3: use fvec and uvec to calculate an orientation matrix
4: load the prefab pmf file, generate new names for the geometry based on names in the prefab file and appending numerical strings to the end
5: transform all geometry by matrix and translate to position (and also relevant data for any chunks from the pmf, like firing points and normals)
« Last Edit: February 18, 2011, 03:57:03 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Re: Turret and Physical Subsytem prefab library/import in pcs2
I second that!
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Turret and Physical Subsytem prefab library/import in pcs2
a handy tool for

1 turret scaling consistency
2 creating multiple versions of a ship with differing turret layouts

all in all, if this is possible, thumbs up from me
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art