Author Topic: zomg experimental features build  (Read 3993 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
zomg experimental features build
OK, this has a helluva lot of changes (none in CVS).

Nebula.tbl
self-explanatory


Scripting
This includes the current progress of my work on getting Lua in there. To see the valid functions and classes, use the "-output_scripting" command line. This will output, in the same directory as the EXE, an HTML file called "scripting.html" with all the implemented scripting stuff.

In addition, to actually use them, make a new table called "script.tbl" in the data/tables directoy. The "$Global:" field will create a globally-executed script.

EG:
data/tables/script.tbl
Code: [Select]
$Global: [
grpc.SetColor(255,255,255,255)
grpc.draWString(1,1,getState())
]


Note that this includes depth-checking for the [] symbols, so you should be able to use arrays without any problem (untested)


Shockwaves
Ooh, this is another fun part. Requested by redmenace for the BSG mod...And totally untested! :D

Weapons.tbl now has several new variables:
Code: [Select]
$Damage:
$Damage type:
$Arm time:
$Arm distance:
$Shockwave damage:

$Blast force:
$Inner radius:
$Outer radius:
$Shockwave speed:
$Shockwave rotation:
$Shockwave model:
$Shockwave name:
$Dinky shockwave:
+Shockwave damage:
+Blast force:
+Inner radius:
+Outer radius:
+Shockwave speed:
+Shockwave rotation:
+Shockwave model:
+Shockwave name:


Obviously shockwave rotation is the rotation of the shockwave; shockwave damage is an override for how much damage the shockwave causes.

Dinky shockwave, arm time, and arm distance are all related. The dinky shockwave values will be used if:
1) The weapon is killed by another weapon (eg subach shooting helios), and arm time and arm distance are not specified
2) The weapon is destroyed, either by hitting its target or getting shot down, but arm_time has not elapsed, or the ship that launched it is still alive and within the arm distance

Or to explain it another way...
If arming conditions are specified, the dinky shockwave will be used until both are true. (ie the weapon is armed) If no arming conditions are specified, the dinky shockwave will be used whenever the weapon is shot down.

Hopefully this means there'll be less mods with shields for the sake of protecting ships from bomb explosions. :)

Last-minute note: Right when the upload finished, I realized that I forgot to copy *all* the shockwave data to the dinky shockwave for backwards compatibility; as a result, I don't think there will be a shockwave if dinky shockwave isn't specified and a bomb is shot down. I'll fix this before CVSing.

http://fs2source.warpcore.org/exes/latest/C10292005.zip
-C

 

Offline redmenace

  • 211
zomg experimental features build
2 more requests
could you add a $Arm Disttotarget and the ability to set the impact explosion if any of the $Arm options are used.

I tested it out. I think it works.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
zomg experimental features build
Oh, I get it.  The Arming stuff is kinda like that sequence in "The Hunt For Red October", when the Sub rams the torpedo and doesn't take dammage because it hadn't armed itself yet.
The Trivial Psychic Strikes Again!

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
zomg experimental features build
:nod: Exactly right.


I added in redmenace's new disttotarget. It's "$Arm radius:" under "$Arm dist:". The section of code that checks for the $Arm variables is starting to look like a piece of scheme, though. :p
Code: [Select]
if(((wip->arm_time) && (Missiontime - wp->creation_time < wip->arm_time))
|| ((wip->arm_dist) && (weapon_parent_objp == NULL || weapon_parent_objp->type == OBJ_NONE || (vm_vec_dist(&weapon_obj->pos, &weapon_parent_objp->pos) < wip->arm_dist)))
|| ((wip->arm_radius) && (wp->homing_object == NULL
|| (wp->homing_subsys == NULL && vm_vec_dist(&weapon_obj->pos, &wp->homing_object->pos) > wip->arm_radius)
|| (wp->homing_subsys != NULL && get_subsystem_pos(&spos, wp->homing_object, wp->homing_subsys) && vm_vec_dist(&weapon_obj->pos, &spos) > wip->arm_radius))))


I don't get the impact explosion thing, though.
-C

 

Offline redmenace

  • 211
zomg experimental features build
sorta like that. I request this so when a viper intercepts a cylon nuke it doesn't show that huge blast.  So instead you see only a small explosion like from a typical missle.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline redmenace

  • 211
zomg experimental features build
this sorta opens up some possibilities for torpedo weapons and other non guided bombs.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
zomg experimental features build
Updated build linked to in first post:
  • $Arm radius below $Arm distance
  • $Dinky impact explosion
  • $Dinky impact explosion radius


Both of the weapon explosion vars are below the original two.



Also, I threw in some code to set the velocity of muzzle flashes to be the same as the ship. In addition, I added some VERY primitive rotational velocity factoring code; this will probably only be accurate on the very outside of a ship. I don't remember enough trig right now to be able to do that.
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
zomg experimental features build
i cant get it to generat the html file
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

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
zomg experimental features build
It was a silly little bug. I've committed a fix to CVS, in the meantime, the file can be found here:

http://fs2source.warpcore.org/temp/scripting.html
-C

 

Offline redmenace

  • 211
zomg experimental features build
I don't think the dinky explosion stuff is working. helios that are intercepted well before the arm radius are flowing the bomb flare thing.

$Name:                           Helios
+Title:                           XSTR("GTM-13 Helios", 3392)
+Description:
XSTR(
"Special Issue
Anti-Capital Ship Weapon
Anti-Matter Torpedo", 3393)
$end_multi_text
+Tech Title:               XSTR("GTM-13 Helios", 3394)
+Tech Anim:                  Tech_Helios
+Tech Description:
XSTR(
"The GTM-13 Helios is the product of an entire generation of high-energy physics research, based primarily at the GTVA particle accelerator complex near Antares. The most powerful warhead in the fleet's arsenal, the Helios generates a massive shockwave from the cataclysmic annihilation of matter and anti-matter, triggered upon impact with its target. Each bank of Helios warheads can fire only once every 30 seconds. The Helios is prohibitively expensive to produce, thus its deployment is severely restricted.", 3395)
$end_multi_text
$Model File:                     helios.pof
$Mass:                           35.0
$Velocity:                        65.0
$Fire Wait:                        30.0
$Damage:                                                                6800                                                                                                    ;; damage applied when within inner radius
$Arm radius:                     10
$Blast Force:                                                   1000.0
$Inner Radius:                     100.0                                       ;; radius at which damage is full (0 for impact only)
$Outer Radius:                     270.0                                       ;; max radius for attenuated damage
$Shockwave Speed:                  75                                        ;; velocity of shockwave.  0 for none.
$Armor Factor:                     1.0
$Shield Factor:                     0.02
$Subsystem Factor:                                              0.85
$Lifetime:                        30.0
$Energy Consumed:                  0.0
$Cargo Size:                     25.0
$Homing:                        YES
   +Type:                              ASPECT                                    ;; Legal: HEAT, ASPECT
   +Turn Time:                         1.5
   +Min Lock Time:                  7.0                                       ;; Minimum lock time (in seconds)
   +Lock Pixels/Sec:               25                                          ;; Pixels moved per sec while locking
   +Catch-up Pixels/Sec:            0                                          ;; Pixels moved per sec while catching up
   +Catch-up Penalty:               15                                          ;; Extra pixels to move after catching up
$LaunchSnd:                        97
$ImpactSnd:                        101                                       ;;      shockwave impact sound
$FlyBySnd:                        -1
$Rearm Rate:                     0.02
$Flags:                           ( "Bomb" "Huge" "No Dumbfire" "player allowed")
$Trail:                                                                          ;; Trail cannot be set if Exhaust is set
   +Start Width:                        0.5                                       ;; Width of trail nearest missile
   +End Width:                           2.0  
   +Start Alpha:                        1.0
   +End Alpha:                           0.0
   +Max Life:                           2.0                                       ;; how many seconds before trail disappears
   +Bitmap:                              MissileTrail02                              ;; Bitmap used to draw trail
$Icon:                                 iconHelios
$Anim:                                 Helios
$Impact Explosion:                     bomb_flare
$Impact Explosion Radius:               200.0
$Dinky impact explosion:               ExpMissileHit1
$Dinky impact explosion radius:            0
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline FireCrack

  • 210
  • meh...
zomg experimental features build
Quote
Originally posted by WMCoolmon


Also, I threw in some code to set the velocity of muzzle flashes to be the same as the ship.


Does this mean we can get muzzle flashes on non-flak weapons (plz plz plz!!!11!!!11!!1111)
« Last Edit: October 30, 2005, 04:05:42 pm by 2073 »
actualy, mabye not.
"When ink and pen in hands of men Inscribe your form, bipedal P They draw an altar on which God has slaughtered all stability, no eyes could ever soak in all the places you anoint, and yet to see you all at once we only need the point. Flirting with infinity, your geometric progeny that fit inside you oh so tight with triangles that feel so right."
3.141592653589793238462643383279502884197169399375105820974944 59230781640628620899862803482534211706...
"Your ever-constant homily says flaw is discipline, the patron saint of imperfection frees us from our sin. And if our transcendental lift shall find a final floor, then Man will know the death of God where wonder was before."

 

Offline Solatar

  • 211
zomg experimental features build
Just tried it, and yes, they work on non-flak weapons and move with the fighter.

 

Offline FireCrack

  • 210
  • meh...
zomg experimental features build
w00tang! I sure hope i didnt delete all those turret muzzle flashes i had made a few days ago when i cleaned out my fs2 directories.. ok i did..

Anyways, they sucked.

But it turns out that turrets still cant use muzzle flashes, would this be hard to change?
« Last Edit: November 17, 2005, 09:35:22 pm by FireCrack »
actualy, mabye not.
"When ink and pen in hands of men Inscribe your form, bipedal P They draw an altar on which God has slaughtered all stability, no eyes could ever soak in all the places you anoint, and yet to see you all at once we only need the point. Flirting with infinity, your geometric progeny that fit inside you oh so tight with triangles that feel so right."
3.141592653589793238462643383279502884197169399375105820974944 59230781640628620899862803482534211706...
"Your ever-constant homily says flaw is discipline, the patron saint of imperfection frees us from our sin. And if our transcendental lift shall find a final floor, then Man will know the death of God where wonder was before."