Author Topic: Things to do in the source code  (Read 19642 times)

0 Members and 1 Guest are viewing this topic.

Offline Scotty

  • 1.21 gigawatts!
  • 211
  • Guns, guns, guns.
Re: Things to do in the source code
So, uh, where would I put in a request for a feature (or removal thereof)?

It might just be the fact that I haven't been able to get the effects mod installed correctly yet, but the sunglare lens flare was just hideously jarring in the first cutscene for the training campaign.

 
Re: Things to do in the source code
You can turn off the sun glare under video options. For the mod, just enable it under mod config.
Did you hear that fellas? She says I have a Meritorious Unit.

 

Offline Thaeris

  • Can take his lumps
  • 211
  • Away in Limbo
Re: Things to do in the source code
I have a code request...

Can we prevent a command from registering/executing if the binding for the command has been removed?

The example I have for this is the "self-distruct" command. By default, it's very close to the virtual cockpit binding, and uses virtually the same sequence (it's shift+esc, or cntrl+esc by default - it's been a while and I do not quite remember which). Thus, in combat, you may not be looking at the ketboard and accidentally trigger this function. If the binding has been removed (and none is thus present), Starshatter seems to revert to the default key commands for a function. I think... this is something that should be looked into.

This particular function, even if it is re-mapped to a different keystroke, is also still a danger to the player if he/she does not want to use it. As such, preventing keystrokes from functioning via their default mapping, should all mapping for the stroke be removed, is a good change for all I can tell.
"trolls are clearly social rejects and therefore should be isolated from society, or perhaps impaled."

-Nuke



"Look on the bright side, how many release dates have been given for Doomsday, and it still isn't out yet.

It's the Duke Nukem Forever of prophecies..."


"Jesus saves.

Everyone else takes normal damage.
"

-Flipside

"pirating software is a lesser evil than stealing but its still evil. but since i pride myself for being evil, almost anything is fair game."


"i never understood why women get the creeps so ****ing easily. i mean most serial killers act perfectly normal, until they kill you."


-Nuke

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Things to do in the source code
That's a rather serious bug.

I would ask you to enter it in the google code bugtracker. Please.  Before I have to institute a "bugs not on the tracker do not exist" policy.

Or use the "Reporting bugs in SSO" thread. Spreading bug reports over so many threads does not make my job easier.
Let there be light
Let there be moon
Let there be stars and let there be you
Let there be monsters and let there be pain
Let us begin to feel again
--Devin Townsend, Genesis

 

Offline Thaeris

  • Can take his lumps
  • 211
  • Away in Limbo
"trolls are clearly social rejects and therefore should be isolated from society, or perhaps impaled."

-Nuke



"Look on the bright side, how many release dates have been given for Doomsday, and it still isn't out yet.

It's the Duke Nukem Forever of prophecies..."


"Jesus saves.

Everyone else takes normal damage.
"

-Flipside

"pirating software is a lesser evil than stealing but its still evil. but since i pride myself for being evil, almost anything is fair game."


"i never understood why women get the creeps so ****ing easily. i mean most serial killers act perfectly normal, until they kill you."


-Nuke

 

Offline Scotty

  • 1.21 gigawatts!
  • 211
  • Guns, guns, guns.
Re: Things to do in the source code
Thank you , Thaeris.  Encountered this by accident last night.  Kind of a rude surprise.

 

Offline Thaeris

  • Can take his lumps
  • 211
  • Away in Limbo
Re: Things to do in the source code
The temporary fix is to re-bind it as a keystroke you're very unlikely to hit - I think I tested that to good effect, somewhere on the other side of my keyboard.
"trolls are clearly social rejects and therefore should be isolated from society, or perhaps impaled."

-Nuke



"Look on the bright side, how many release dates have been given for Doomsday, and it still isn't out yet.

It's the Duke Nukem Forever of prophecies..."


"Jesus saves.

Everyone else takes normal damage.
"

-Flipside

"pirating software is a lesser evil than stealing but its still evil. but since i pride myself for being evil, almost anything is fair game."


"i never understood why women get the creeps so ****ing easily. i mean most serial killers act perfectly normal, until they kill you."


-Nuke

 
Re: Things to do in the source code
I have a request concerning flak. Right now if you use the vanilla flak on a weapon it's a fps nightmare. I made a pretty good flak weapon using the sub munition and animation codes but they only work on guided missiles. This causes a lot of countermeasure spamming from the ai and the player is assaulted with incoming missile warnings and each flak shot shows up on radar/hud. Not to mention that flak isn't supposed to follow you around.

Would it be possible to allow sub munitions  on unguided weapons? I was thinking this would be the easiest fix. The alternative would be to change the way explosions are dealt with which sounds like a much bigger job.
Did you hear that fellas? She says I have a Meritorious Unit.

 
Re: Things to do in the source code
I have a request concerning flak. Right now if you use the vanilla flak on a weapon it's a fps nightmare. I made a pretty good flak weapon using the sub munition and animation codes but they only work on guided missiles. This causes a lot of countermeasure spamming from the ai and the player is assaulted with incoming missile warnings and each flak shot shows up on radar/hud. Not to mention that flak isn't supposed to follow you around.

Would it be possible to allow sub munitions  on unguided weapons? I was thinking this would be the easiest fix. The alternative would be to change the way explosions are dealt with which sounds like a much bigger job.

Lag comes from the particles made for the explosion, too many flak and you have hundreds of particles lagging the game. I made explosions use only a few particles and lag went away.
You can make the submunition missile be dumbfire (rocket) so it doesnt trigger counter measures, but making sub munitions be used on normal shots would be better indeed.

 
Re: Things to do in the source code
My thoughts on things to do with the code:

1- Support to use animated sprites  for explosions and such like in FS2, particles have many drawbacks in terms of lag. Importing FS2 FX would be awesome.

2- Fix CRASH when 7 or more of ships on your side declare "engaging" at the same time.

3- Sub munitions for normal bolt weapons, and "flak = true" working with it.

4- Holding mouse left click selects multiple fighters at once in Flight Screen (carrier).

5- Implement a "loop" navpoint type with optional "random waypoint", so patrols keep patrolling instead of RTB so early and making more interesting group movements. (player missions should not use them or it can last forever)

6- Code for dynamic campaign strategy AI and movement is really basic, could use more love and complexity. "war production" concept in docs is hardly used in game.

7- Starship groups could move more "in group" instead of rushing  individually to their glory or death. (maybe use some tweaked fighter AI formation code?)

8- AI use of quantum jumps to flee would be nice. (quantum jumps in ships def. files would need some tweaking after that)

9- more choices of speed above 1000 m/s in waypoint editing. Fighters really can go faster than that.

10- AI could use EMCOM levels on their own. It is a nice "seek & hide" mechanic not really being used except by the player (witch should be labelled as cheating IMHO)

11- Engineering screen. I still cant get a clue on how much power is used/produced  and delivered to ships systems. We need a more clear picture of what is going on with our ships power so we can make it more useful/challenging.

12- Enemy AI  declared as threat, keeps like that even if you are out of his sensors range or it is not engaging you,  keeping you from finishing the mission without jumping to other sector or landing.

2,7,12  could be labelled as "critical" I would say. The game badly needs those 3 fixed.

 
Re: Things to do in the source code
I tried to make them dumbfire but the sub munition never triggers. You wouldn't happen to know which explosion is used for the flak would you? Is it SHOT_BLAST?

Edit: I think that's a solid list, I'm particularly fond of #1.
« Last Edit: June 12, 2012, 07:58:55 pm by rscaper1070 »
Did you hear that fellas? She says I have a Meritorious Unit.

 
Re: Things to do in the source code
I tried to make them dumbfire but the sub munition never triggers. You wouldn't happen to know which explosion is used for the flak would you? Is it SHOT_BLAST?

Now you got me. I dont remember how I did it for the dumbfire.
As for explosions, it is Shot_blast.  Take care because shot_blast is used in Flak and missile hits. You need an explosion that fits in those 2 roles.

As example this is what I use in explosions def.


Code: [Select]
explosion: {
   type:             SHOT_BLAST,
   lifetime:         2, //4

//   light_level:      500, //2.5
//   light_decay:      0.8 , //0.8
//   light_color:      (255,255,255),

   num_parts:        8,//12
   particles:        "Flak5.jpg" , //"flak4.pcx",
   part_speed:       18, //70
   part_trail:       false,
// part_drag:        40
   part_rate:        2.5, //2.5
   part_decay:       170, //130
   part_scale:       0.1, //0.8
   part_bloom:       0.6,//6
   sound:            "Blast-87-03.wav",
   sound_min_dist:   5e3,
   sound_max_dist:   20e3
     
}



[attachment deleted by a ninja]
« Last Edit: June 12, 2012, 08:16:15 pm by light_gemini »

 
Re: Things to do in the source code
Even with those changes to shot blast the flak is still slowing everything to a crawl. Here's my sub munition solution. Maybe you could take a look and see what I need to do to make them dumbfire.


Code: [Select]
WEAPON

missile: {
   name:             "flakturret"
   group:            "FLAK"


   target_type:      0x000f00ff
   value:            2
   ammo:             1000
   recharge_rate:    10
   refire_delay:     25
   salvo_delay:      2
   charge:           1
   min_charge:       1
   damage:           100
   lethal_radius:    200
   speed:            5e3
   life:             10

   self_aiming:      true
   aim_az_max:       1
   aim_el_max:       1

   min_range:         1e3
   max_range:        15e3
   max_track:        25e3
   
   carry_mass:       0.54
   carry_resist:     2
   
   guided:           1
   mass:             0.5
   thrust:           3.3e3
   drag:             2
   roll_drag:        4
   pitch_drag:       4
   yaw_drag:         4
   roll_rate:        1
   pitch_rate:       4
   yaw_rate:         4
   
   det_range:        5e2
   det_count:        10
   det_child:        "Flakshot SUB"
   det_spread:       100

   graphic_type:     3,      // blob
   width:            3,
   length:           20,
   light:            20,
   light_color: (255,255,0),
   bitmap:         "WeaponEffects/Shot4+.pcx",
   flash:          "WeaponEffects/Flash4+.pcx",
   flash_scale:       3,
   sound:            "WeaponEffects/EXPLODE1.WAV",
   sound_min_dist:   0,
   sound_max_dist:   6e3
}

Code: [Select]
WEAPON

primary: {
   name:             "Flakshot SUB"

   target_type:      0x000fffff,
   value:            3,
   lethal_radius:    1e3
   charge:           1,
   damage:           30,
   speed:            3e2,
   life:             1,


   graphic_type:     2, // sprite
   animation:        "WeaponEffects/Exp20_0004.pcx",
   animation:        "WeaponEffects/Exp20_0006.pcx",
   animation:        "WeaponEffects/Exp20_0008.pcx",
   animation:        "WeaponEffects/Exp20_0010.pcx",
   animation:        "WeaponEffects/Exp20_0012.pcx",
   animation:        "WeaponEffects/Exp20_0014.pcx",
   animation:        "WeaponEffects/Exp20_0016.pcx",
   animation:        "WeaponEffects/Exp20_0018.pcx",
   animation:        "WeaponEffects/Exp20_0020.pcx",
   animation:        "WeaponEffects/Exp20_0022.pcx",
   animation:        "WeaponEffects/Exp20_0024.pcx",
   animation:        "WeaponEffects/Exp20_0026.pcx",
   animation:        "WeaponEffects/Exp20_0028.pcx",
   animation:        "WeaponEffects/Exp20_0030.pcx",
   animation:        "WeaponEffects/Exp20_0032.pcx",
   animation:        "WeaponEffects/Exp20_0034.pcx",   

   sound:            "WeaponEffects/EXPLODE1.wav",
   sound_min_dist:   2e3,
   sound_max_dist:   20e3,
}
Did you hear that fellas? She says I have a Meritorious Unit.

 
Re: Things to do in the source code
Start setting this:

roll_rate:       0   
pitch_rate:     0
yaw_rate:       0

so missile has no means to change its direction.Try  guided=0 if you didnt already (maybe you did and it didnt work). This wont fix the flare spam though, I remember I only tried this on turret mounted guns for starships.

As for lag I can have 10 guns firing flak at 2 shots per second and dont get lag, maybe its because of the video card.

 

Offline Echelon9

  • 210
Re: Things to do in the source code
2,7,12  could be labelled as "critical" I would say. The game badly needs those 3 fixed.

Two, seven and twelve have been reported on the Issue tracker
https://code.google.com/p/starshatter-open/issues/list

 
Re: Things to do in the source code
How does the "Escort" command work?  I'll order other members of a battle group to escort me in an effort to keep the group together, but if we're already scattered they rarely come closer.  Many times I've had them match my speed and orientation - which means they still maintain the same distance from me, even if it's 150km.

I'm not sure if this is a bug or if I'm not using the order correctly.  Either way, it makes it hard to coordinate assaults with other ships.  I end up using the nav map to plot waypoints to a point somewhere along my vector en route to an unidentified target.  It's a process I don't often estimate correctly . . .

 

Offline Lucan

  • 23
Re: Things to do in the source code
How does the "Escort" command work?  I'll order other members of a battle group to escort me in an effort to keep the group together, but if we're already scattered they rarely come closer.  Many times I've had them match my speed and orientation - which means they still maintain the same distance from me, even if it's 150km.

I'm not sure if this is a bug or if I'm not using the order correctly.  Either way, it makes it hard to coordinate assaults with other ships.  I end up using the nav map to plot waypoints to a point somewhere along my vector en route to an unidentified target.  It's a process I don't often estimate correctly . . .

What ship class did you give the escort order to?  Each class (e.g. destroyers, frigates, etc.) may respond differently depending on the battlefield conditions.  For example: if you order friendly destroyers to form up, and they are already within sensor range of the enemy, then chances are they will override your escort orders and attack the enemy ships instead.  Frigates, on the other hand, will follow whatever commands you give them (in most instances).

One of the most frustrating things encountered during custom mission building is a phenomenon known as, wandering AI syndrome. In some instances, AI-controlled ships will simply refuse to follow designated waypoints and drift about aimlessly.  Sometimes, resetting waypoints helps - but not always.

 
Re: Things to do in the source code
How does the "Escort" command work?  I'll order other members of a battle group to escort me in an effort to keep the group together, but if we're already scattered they rarely come closer.  Many times I've had them match my speed and orientation - which means they still maintain the same distance from me, even if it's 150km.

I'm not sure if this is a bug or if I'm not using the order correctly.  Either way, it makes it hard to coordinate assaults with other ships.  I end up using the nav map to plot waypoints to a point somewhere along my vector en route to an unidentified target.  It's a process I don't often estimate correctly . . .

What ship class did you give the escort order to?  Each class (e.g. destroyers, frigates, etc.) may respond differently depending on the battlefield conditions.  For example: if you order friendly destroyers to form up, and they are already within sensor range of the enemy, then chances are they will override your escort orders and attack the enemy ships instead.  Frigates, on the other hand, will follow whatever commands you give them (in most instances).

One of the most frustrating things encountered during custom mission building is a phenomenon known as, wandering AI syndrome. In some instances, AI-controlled ships will simply refuse to follow designated waypoints and drift about aimlessly.  Sometimes, resetting waypoints helps - but not always.

Usually either cruisers or destroyers.  I love it when there are enemy contacts because the ships will respond to an attack order.  Usually my frustration comes from when I've finished off an enemy, the scope is clear, and I see flares of enemy ships outside of sensor range.  By that time the group is scattered and I give the order to escort to bring them back as a group so I don't get slammed when I get in range of two Broadswords.  I've tried sneaking into sensor range so I can give an order to engage, but usually I'm spotted and the enemy comes after me.  Sometimes I can lead them into the ambush, sometimes I get caught and skewered.

I've also noticed when they'll ignore a "Move Patrol" order as well.  The only way I can direct any kind of movement is by estimating a waypoint and cancelling their orders.  (Speaking of which, there's minor typo in the text order - it says ". . . request mission" instead of ". . . resume mission" - is that even worth a bug report?)

I guess the bottom line is that ship orders need to be more clearly defined.  Escort could mean "attack any enemy targeting this ship" or "attack any enemy directly attacking this ship."  Here I've been using it more for "Form Up" or "Follow Me" - which might just need to be added to available orders, if possible.  Either way, it'd be nice to at least know what the orders actually mean.

 

Offline Lucan

  • 23
Re: Things to do in the source code
I haven't tested cruisers, but I do know that destroyers will override any orders if there is an enemy vessel within its attack radius.  One workaround that wdboyd implemented was to change the class designation in the .def file to frigate. 

It would be a good thing if we knew the parameters that define the various commands and ship classes.  One example that comes to mind is the difference between a battleship and a dreadnought.  From a modding perspective, it would be very helpful to have a comprehensive explanation that details the differences between the two classes.
« Last Edit: June 14, 2012, 09:08:07 pm by Lucan »

 
Re: Things to do in the source code
Could there be a way to allow you to scale coronas in the system.def? Right now the corona stays the same scale if you're orbiting Mercury or if you're orbiting Neptune. It's just an aesthetics thing but I think it would give a sense of scale as the player hops around the system.
Did you hear that fellas? She says I have a Meritorious Unit.