StellarForum
February 05, 2012, 07:31:07 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Stellar Frontier has moved to the new forum and site at stellarfrontier.com!
Please make a new account there in preparation for SF 2.0 and to chat on the boards!
 
   Home   Help Search Groups Login Register  
Pages: [1] 2 3
  Send this topic  |  Print  
Author Topic: More things you should know about modding  (Read 3148 times)
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« on: October 12, 2009, 03:51:18 PM »

ok i am going to list some of the functions of some params not mentioned in the mod tutorial by Mordok.
for boost: 3 params: fuel*speed [100 = 0.10c]*accel added
power: 1 param: i think it has something to do with this number times volume [e.g. power*50 probably means: capacity = volume*50 or something]

to make your life easier i will give example:

[race] * 500 blah blah blah code code code power*500     WILL BE MORE POWERFUL THAN
[race] * 500 blah blah blah code code code power*50

[race] * blah blah blah code code code boost*600*140*500 means the booster will have 600 fuel units, the ship will go exactly 0.14c faster than normal, and it will accelerate way better, but i have yet to find out the exact measurements for the accelerate param.

i have only spent 1 or 2 hours modding so there will probably be more coming
Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
Weylin
Veteran Member
*****
Posts: 336

Get ambushed, die, repeat...


Email
« Reply #1 on: October 12, 2009, 07:26:34 PM »

regarding power.

the set value for the power determines recharge.
The parameter (power*number) is a multiplier that will set the amount of capacity the unit has.

So a 600 power, power*30 module will have a capacity of... 18,000?



As for booster speed, it's a % I think, not a direct value... hence why a star base only gets to .14c or so.
As for accel, it might be something like  pixels/s/s divided by 10
Report to moderator   Logged
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #2 on: October 13, 2009, 08:59:12 AM »

regarding power.

the set value for the power determines recharge.
The parameter (power*number) is a multiplier that will set the amount of capacity the unit has.

So a 600 power, power*30 module will have a capacity of... 18,000?



As for booster speed, it's a % I think, not a direct value... hence why a star base only gets to .14c or so.
As for accel, it might be something like  pixels/s/s divided by 10

Cant explain at the moment (busy right now)

I believe it depends on mass for acceleration and inital speed for extra speed gained towards max speed bonus.


I know this may be garble to you but

void ModuleClass::Thrust() {

  static CoordinateClass ovel;

  host.designed->CheckTransition(nullVector, 1);

  if (!host.designed->IsTransitioning()) {

    /* set the throttle flag */
    if ( IsLocalPlayer(host.ship) ) /* dlh */
      host.designed->throttle = 1;

    /* apply thrust to designed object [host] */

    long thr;
    long af = host.designed->mass*100/frameRate/frameRate;
    if (host.designed->bus.boostMod && host.designed->bus.boostMod->active)
      thr = (10000 + host.designed->bus.boostMod->cPar(2, host.designed->bus.CalculateSurplusPower())) *
   host.designed->bus.impulseMod->afMaxPar(af,0) / 10000;
    else
      thr = aPar(0);

    /******************************************************************/
    /* do not allow the acceleration to exceed the game state maximum */
    /*                             and                                */
    /* do not allow acceleration to fall below the prescribed minimum */
    /******************************************************************/
    if (host.designed->bus.boostMod)
       thr = max(min(thr, (game->maxAcc + host.designed->bus.boostMod->par[2]) * af/100), 0);
   else
       thr = max(min(thr, game->maxAcc * af/100), 0);

    ovel = host.generic->vel;

    host.generic->
      ApplyThrust(host.generic->bitmap.Dir(host.designed->heading+
                   host.designed->thrustOffset) *
        thr, host.designed->maxSpeed);

    long pct = (host.generic->vel-ovel).Mag() * 100 /
      max(thr*sub_scale / max(host.generic->mass, 1) * dt,1);
    SetStat(store,max(store + power * pct / 100, 0L));
    //store = max(store + power * pct / 100, 0L);
    //store = 0;
  }
}

I will explain later. I believe thats most of it anyways, aka the general rules.

Also while I was looking about I see that two powers might combine into one (aka you can use more then 1 power on a ship correctly. Someone should tryt hat out.
« Last Edit: October 13, 2009, 09:15:52 AM by NiteHawk » Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« Reply #3 on: October 13, 2009, 09:14:10 AM »

well the way i tested it:
set a ship going 0.14 [mothership]
added a boost4: [mainly because i didnt like how it kept getting stuck by planet gravity]
5000*110*9600
the speed increased by 0.11..[now going 0.25]
just coincidence, or is the way i explained speed true?
« Last Edit: October 13, 2009, 09:25:02 AM by NiteHawk » Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #4 on: October 13, 2009, 09:25:17 AM »

Oop edited post by mistake.


Coincidence yes.  You need to test using more then just one ship. Your first value is correct, it does relate to how much boost units it has.

However, max speed I believe affects how much of a max speed boost you get. try it in a scout for example. Your 110 units give almost double speed. Aka 0.72 about to like.. 1.38 I believe. It is not a set number, but more a affect depending on the max speed of the ship WITHOUT a boost.

Accel has to do with mass of a ship, the third value that is. Since you are using a boost value of 500 for acceleration, you are most likely capping out the max acceleration per frame, thus will never notice a difference on any ship accel wise because you just cap it right to the max.
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« Reply #5 on: October 13, 2009, 09:33:00 AM »

the high accell was because i got tired of having my slow, large mothership getting stuck on planets Tongue
the thing has a mass of 400k, it needs all that accell lol

btw, i set dart damage to a real high value, around 1000 or 2000, and they raped everything,

changed the value to 200 for balancing,

and they still did a fairly decent job of raping stuff,

but the normal ones did 150 damage and it took like 10 of them to kill a shield6,

now it takes like 2 or 3 to blow up a ship, whats with that?

edit: im in school right now, and comp progamming class just about ended, so, yeah Cheesy
« Last Edit: October 13, 2009, 11:58:28 AM by warfighter67 » Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
Weylin
Veteran Member
*****
Posts: 336

Get ambushed, die, repeat...


Email
« Reply #6 on: October 14, 2009, 03:02:53 PM »

Could you explain to me what the

something->something-> etc things are? I'm not familiar with the language, but I sort of understand the rest of it... sort of... mostly a matter of knowing what the hell the variables present do, especially the vague non-descriptive ones.
Report to moderator   Logged
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« Reply #7 on: October 16, 2009, 08:21:10 AM »

btw, i set dart damage to a real high value, around 1000 or 2000, and they raped everything,

changed the value to 200 for balancing,

and they still did a fairly decent job of raping stuff,

but the normal ones did 150 damage and it took like 10 of them to kill a shield6,

now it takes like 2 or 3 to blow up a ship, whats with that?

edit: im in school right now, and comp progamming class just about ended, so, yeah Cheesy

i think i found the fixer, warhead strength AND damage both contribute to the damage of a projectile, the warhead strength was at about 8000 lol, could someone please tell me what the formula for both of those in factoring damage is?
Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #8 on: October 16, 2009, 01:17:19 PM »

btw, i set dart damage to a real high value, around 1000 or 2000, and they raped everything,

changed the value to 200 for balancing,

and they still did a fairly decent job of raping stuff,

but the normal ones did 150 damage and it took like 10 of them to kill a shield6,

now it takes like 2 or 3 to blow up a ship, whats with that?

edit: im in school right now, and comp progamming class just about ended, so, yeah Cheesy

i think i found the fixer, warhead strength AND damage both contribute to the damage of a projectile, the warhead strength was at about 8000 lol, could someone please tell me what the formula for both of those in factoring damage is?

damage in the modules files is for hitpoints of a module, aka when shields go down how much hitpoints until something is disabled (for reactor its explosion).

-> is just a pointer to another area. For exmaple, since its a MODULECLASS, which means the actual module file calling this, it needs a pointer to the ship its actually on. host.generic is it here.

 if (host.designed->bus.boostMod)

Means if the ship that this module is on has boost, then do something, for example. Basicly its because there in different structures, aka Shipclass, Designedclass, Moduleclass, Colonyclass, etc. You cannot call a variable in shipclass if you are in moduleclass without referencing the ship you want to define for example.

DesignedClass is more of a global one, colony/ships have it.
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
Weylin
Veteran Member
*****
Posts: 336

Get ambushed, die, repeat...


Email
« Reply #9 on: October 17, 2009, 12:06:58 AM »

Thank you, that helped  Grin
Report to moderator   Logged
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« Reply #10 on: October 17, 2009, 11:56:23 AM »

every time i try to make a 4th laser with the simple name of "superlaser" i get the error msg when i go to play, as what happens when you mod something and the ship's vol cant fit it, you messed up in the making of it, etc.

i copied the laser III data and pasted it right after, took out the alt+0160 or w/e, renamed it, re-ID'd it to 4504 instead of 4503, changed vol and mass to 1, that wasnt the problem... heres exactly what i have for my superlaser:

   [race]    superlaser   1 1 -400     400        beam        none   beam*30*1500*100*[cr]*4         

i noticed a "[cr]*4" any help on what that means? maybe its whats causing the error for all i know
Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
Weylin
Veteran Member
*****
Posts: 336

Get ambushed, die, repeat...


Email
« Reply #11 on: October 17, 2009, 08:45:28 PM »

I think it's beam*energy*damage?*range?*color*not upgradable
range and damage might be swapped though... Idk.

[cr] is just a defined color, and the *4 just means the weapon cannot be upgraded?

It seems fine to me... I don't see what would be causing it... have you tried dampening the values on it? especially that 1500?
Report to moderator   Logged
Sandtrooper
Vice CinC of TRIBE
Administrator
Expert Member
*****
Posts: 504



WWW Email
« Reply #12 on: October 17, 2009, 08:47:41 PM »

[cr] is just a defined color, and the *4 just means the weapon cannot be upgraded?

*4 = Sets the manual/normal fire switch, Laser I is set to *6 and thus set to fire manually from the Spacebar.
Report to moderator   Logged



Fleet Admiral Sandtrooper
2nd in Command of TRIBE

TRIBE-SD)    オークエボリューション
(Oak Evolution)
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« Reply #13 on: October 17, 2009, 11:05:09 PM »

i was able to make new weapons after i got everything set in rows like most mods are, instead of reading across a ton of stuff to find what i need in the normal sf.sec files

made like 8 different lasers and 2 new weapons lol
Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« Reply #14 on: October 18, 2009, 08:39:12 AM »

question....

how do you determine the time a "timed mine" takes before it explodes? im trying to make a large, high damage mine, that goes off after 10 seconds
Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
Pages: [1] 2 3
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!