Porting weapon vars from 1.3 to 1.4

Porting weapon vars from 1.3 to 1.4

Postby bonifarz » 26 Mar 2013, 12:05

Hi everyone.

In case you wish to use an old set of weapon variables ("weapon mod") with the 1.4 release, this trivial awk script might be helpful.

This is really just a cheap workaround, so do not expect the ported weapons to behave as they used to, as there may be many subtle changes to the meaning of these variables.
Be sure to test the ported variables and to use another writevars, which will result in much a smaller file.

Feel free to comment about renamed vars i have missed and related problems or quirks.

Have fun!

EDIT: Old default values for all weapon vars, conversion of collision flags and assignment of all new flak vars added.

portWpnVars.awk:
{l Code}: {l Select All Code}

# usage: usage: gawk -f portWpnVars.awk wpnVars1.3.cfg oldFile.cfg > newFile.cfg
# purpose: A little help to import weapon variables from RE 1.3 to RE 1.4
# reliability: None, weapon vars always need to be tested and adjusted
# author: Bonifarz
# license: cc-sa-3.0
#

{
    #substitutions to be done on every line
    sub("\r"," ",$0)       # In case there are ugly win/dos line breaks

    sub("adelay","attackdelay",$0)
    sub("edelay","escapedelay",$0)
    sub("gdelay","guideddelay",$0)
    sub("pdelay","projdelay",$0)
    sub("rdelay","reloaddelay",$0)

    sub("torsodmg","torsodamage",$0)
    sub("legsdmg","legdamage",$0)
    sub("selfdmg","selfdamage",$0)
    sub("teamdmg","teamdamage",$0)
    sub("whipdmg","whipdamage",$0)

    sub("pusharea","wavepush1",$0)
    sub("slow","stunscale",$0)
    sub("zdiv","spreadz",$0)
    sub("minspread","spreadmin",$0)

    sub("flak","frag",$0)           # cheap quickfix, exceptions below
    sub("fragdmg","flakdamage",$0)
    sub("fragcollide","flakcollide",$0)
    sub("fragffwd","fragjump",$0)   # Wild guess, probably wrong

    # shift in fragweap due to mines
    if( match($0,"fragweap") ) {
        if($2>8){ $2++ }
        if($2==19){ $2=21 }
    }

    if( match($0,"crit") ){ $0 = "echo deprecated: "$0 }

    # <wpn>allowed could be converted to <wpn>muts using $mutsbitinstagib and $mutsbitduel
    # however it is probably saver to leave the muts as they are, so we don't do anything here.
    if( match($0,"allowed") ){
        NEXT
    }

    #vars that have been split into primary/ secondary
    if( match($1,"wavepush") ){
        print $0
        sub("wavepush1","wavepush2",$0)
    }

    #new conventions for collide and fragcollide:
    if( match($0,"collide") ){
        # extract the collision flags using a bitwise and() 
        # this is clumsy, but should be easier to understand/debug
        impactgeom=and($2,1)/1
        bouncegeom=and($2,2)/2
        impactppl=and($2,4)/4
        bounceppl=and($2,8)/8
        impactshot=and($2,16)/16
        traced=and($2,32)/32
        hitowner=and($2,64)/64
        contin=and($2,128)/128 # where does this go?
        sticky=and($2,256)/256
        destroy=and($2,512)/512 # deprecated?

        #export the result - again clumsy but foolproof
        $2 =1*traced
       #$2+=2*hitproj
        $2+=4*hitowner
        $2+=8*impactgeom
        $2+=16*impactppl
        $2+=32*impactshot
        $2+=64*bouncegeom
        $2+=128*bounceppl
       #$2+=256bounceshot
        $2+=512*drillgeom
        $2+=1024*drillppl
        $2+=2048*drillshot
        $2+=4096*sticky #geom
        $2+=8192*sticky #ppl
    }
    print $0
}

END{
    #this part is optional: Set all new flak variables to the corresponding modified value

    #two temp arrays for better readability of the loop
    split ("melee pistol sword smg shotgun flamer plasma rifle grenade rocket", wpn, " ")
    split ("delta1 delta2 elasticity1 elasticity2 explcol1 explcol2 explode1 explode2 extinguish1 extinguish2 guided1 guided2 guideddelay1 guideddelay2 headmin1 headmin2 hitpush1 hitpush2 interacts1 interacts2 legdamage1 legdamage2 minspeed1 minspeed2 partcol1 partcol2 partlen1 partlen2 partsize1 partsize2 parttype1 parttype2 proxdelay1 proxdelay2 proxdist1 proxdist2 proxtime1 proxtime2 proxtype1 proxtype2 radial1 radial2 radius1 radius2 reflectivity1 reflectivity2 residual1 residual2 selfdamage1 selfdamage2 stunfall1 stunfall2 stunscale1 stunscale2 stuntime1 stuntime2 taper1 taper2 taperin1 taperin2 taperout1 taperout2 teamdamage1 teamdamage2 teampenalty1 teampenalty2 torsodamage1 torsodamage2 visfade1 visfade2 vistime1 vistime2 waterfric1 waterfric2 wavepush1 wavepush2 weight1 weight2 whipdamage1 whipdamage2", flakvar, " ")
   
    for (i in wpn){
        for (j in flakvar){
            print wpn[i] "flak" flakvar[j] "  $" wpn[i] flakvar[j]
        }
    }
}


wpnVars1.3.cfg
{l Code}: {l Select All Code}
    meleename melee
    meleecolour 0xEEEEEE
    meleepartcol1 0xEEEE22
    meleepartcol2 0xEEEE22
    meleeexplcol1 -1
    meleeexplcol2 -1
    meleelaser 0
    meleeadd 1
    meleemax 1
    meleesub1 0
    meleesub2 0
    meleeadelay1 250
    meleeadelay2 500
    meleerdelay 50
    meleedamage1 30
    meleedamage2 40
    meleespeed1 0
    meleespeed2 0
    meleepower1 0
    meleepower2 0
    meleetime1 100
    meleetime2 100
    meleepdelay1 10
    meleepdelay2 10
    meleegdelay1 0
    meleegdelay2 0
    meleeedelay1 200
    meleeedelay2 200
    meleeexplode1 0
    meleeexplode2 0
    meleerays1 1
    meleerays1 1
    meleespread1 1
    meleespread2 1
    meleezdiv1 1
    meleezdiv2 1
    meleeaiskew1 1
    meleeaiskew2 1
    meleeflakweap1 -1
    meleeflakweap2 -1
    meleeflakrays1 5
    meleeflakrays2 5
    meleeflaktime1 500
    meleeflaktime2 500
    meleeflakspeed1 0
    meleeflakspeed2 0
    meleecooked1 0
    meleecooked2 0
    meleeguided1 0
    meleeguided2 0
    meleeextinguish1 2
    meleeextinguish2 2
    meleeradial1 0
    meleeradial2 0
    meleeresidual1 0
    meleeresidual2 0
    meleereloads 0
    meleecarried 0
    meleezooms 0
    meleefullauto1 1
    meleefullauto2 1
    meleeallowed 2
    meleecritdash1 500
    meleecritdash2 500
    meleetaperin1 0
    meleetaperin2 0
    meleetaperout1 0
    meleetaperout2 0
    meleeelasticity1 .5
    meleeelasticity2 .5
    meleereflectivity1 0
    meleereflectivity2 0
    meleerelativity1 0
    meleerelativity2 0
    meleewaterfric1 0
    meleewaterfric2 0
    meleeweight1 0
    meleeweight2 0
    meleeradius1 1
    meleeradius2 1
    meleekickpush1 0
    meleekickpush2 0
    meleehitpush1 50
    meleehitpush2 100
    meleeslow1 0
    meleeslow2 0
    meleeaidist1 16
    meleeaidist2 16
    meleepartsize1 1
    meleepartsize2 2
    meleepartlen1 0
    meleepartlen2 0
    meleeparttype1 0
    meleeparttype2 0
    meleefrequency 0
    meleepusharea 1
    meleecritmult 2
    meleecritdist 0
    meleedelta1 10
    meleedelta2 10
    meleetrace1 4
    meleetrace2 4
    meleeheadmin1 0
    meleeheadmin2 0
    meleewhipdmg1 .8
    meleewhipdmg2 .8
    meleetorsodmg1 .7
    meleetorsodmg2 .6
    meleelegsdmg1 .3
    meleelegsdmg2 .3
    meleeflakscale1 1
    meleeflakscale2 1
    meleeflakspread1 1
    meleeflakspread2 1
    meleeflakrel1 1
    meleeflakrel2 1
    meleeflakffwd1 0
    meleeflakffwd2 0
    meleeflakoffset1 8
    meleeflakoffset2 8
    meleeflakskew1 1
    meleeflakskew2 1
    meleecollide1 36
    meleecollide2 36
    meleeflakcollide1 36
    meleeflakcollide2 36
    pistolname pistol
    pistolcolour 0x888888
    pistolpartcol1 0x666611
    pistolpartcol2 0x666611
    pistolexplcol1 -1
    pistolexplcol2 -1
    pistollaser 0
    pistoladd 10
    pistolmax 10
    pistolsub1 1
    pistolsub2 2
    pistoladelay1 150
    pistoladelay2 350
    pistolrdelay 1000
    pistoldamage1 35
    pistoldamage2 3
    pistolspeed1 3000
    pistolspeed2 1000
    pistolpower1 0
    pistolpower2 0
    pistoltime1 2000
    pistoltime2 400
    pistolpdelay1 0
    pistolpdelay2 0
    pistolgdelay1 0
    pistolgdelay2 0
    pistoledelay1 200
    pistoledelay2 200
    pistolexplode1 0
    pistolexplode2 0
    pistolrays1 1
    pistolrays2 10
    pistolspread1 1
    pistolspread2 10
    pistolzdiv1 2
    pistolzdiv2 1
    pistolaiskew1 100
    pistolaiskew2 100
    pistolflakweap1 -1
    pistolflakweap2 -1
    pistolflakdmg1 10
    pistolflakdmg2 12
    pistolflakrays1 5
    pistolflakrays2 5
    pistolflaktime1 500
    pistolflaktime2 500
    pistolflakspeed1 0
    pistolflakspeed2 0
    pistolcooked1 0
    pistolcooked2 0
    pistolguided1 0
    pistolguided2 0
    pistolextinguish1 2
    pistolextinguish2 2
    pistolradial1 0
    pistolradial2 0
    pistolresidual1 0
    pistolresidual2 0
    pistolreloads -1
    pistolcarried 0
    pistolzooms 0
    pistolfullauto1 0
    pistolfullauto2 0
    pistolallowed 2
    pistolcritdash1 0
    pistolcritdash2 0
    pistoltaperin1 0
    pistoltaperin2 0
    pistoltaperout1 0
    pistoltaperout2 0
    pistolelasticity1 .5
    pistolelasticity2 .5
    pistolreflectivity1 0
    pistolreflectivity2 0
    pistolrelativity1 .05
    pistolrelativity2 .05
    pistolwaterfric1 2
    pistolwaterfric2 2
    pistolweight1 0
    pistolweight2 0
    pistolradius1 1
    pistolradius2 1
    pistolkickpush1 6
    pistolkickpush2 4
    pistolhitpush1 35
    pistolhitpush2 50
    pistolslow1 0
    pistolslow2 0
    pistolaidist1 256
    pistolaidist2 256
    pistolpartsize1 2
    pistolpartsize2 .5
    pistolpartlen1 10
    pistolpartlen2 10
    pistolparttype1 1
    pistolparttype2 1
    pistolfrequency 0
    pistolpusharea 1
    pistolcritmult 3
    pistolcritdist 128
    pistoldelta1 10
    pistoldelta2 10
    pistoltrace1 1
    pistoltrace2 1
    pistolheadmin1 0
    pistolheadmin2 0
    pistolwhipdmg1 .8
    pistolwhipdmg2 .8
    pistoltorsodmg1 .65
    pistoltorsodmg2 .65
    pistollegsdmg1 .325
    pistollegsdmg2 .325
    pistolflakscale1 1
    pistolflakscale2 1
    pistolflakspread1 1
    pistolflakspread2 1
    pistolflakrel1 1
    pistolflakrel2 1
    pistolflakffwd1 0
    pistolflakffwd2 0
    pistolflakoffset1 8
    pistolflakoffset2 8
    pistolflakskew1 1
    pistolflakskew2 1
    pistolcollide1 53
    pistolcollide2 53
    pistolflakcollide1 53
    pistolflakcollide2 53
    swordname sword
    swordcolour 0x4444FF
    swordpartcol1 0x4444FF
    swordpartcol2 0x4444FF
    swordexplcol1 0x4444FF
    swordexplcol2 0x4444FF
    swordlaser 0
    swordadd 1
    swordmax 1
    swordsub1 0
    swordsub2 0
    swordadelay1 500
    swordadelay2 750
    swordrdelay 50
    sworddamage1 30
    sworddamage2 60
    swordspeed1 0
    swordspeed2 0
    swordpower1 0
    swordpower2 0
    swordtime1 350
    swordtime2 500
    swordpdelay1 10
    swordpdelay2 10
    swordgdelay1 0
    swordgdelay2 0
    swordedelay1 200
    swordedelay2 200
    swordexplode1 0
    swordexplode2 0
    swordrays1 1
    swordrays1 1
    swordspread1 1
    swordspread2 1
    swordzdiv1 1
    swordzdiv2 1
    swordaiskew1 1
    swordaiskew2 1
    swordflakweap1 -1
    swordflakweap2 -1
    swordflakdmg1 15
    swordflakdmg2 30
    swordflakrays1 5
    swordflakrays2 5
    swordflaktime1 500
    swordflaktime2 500
    swordflakspeed1 0
    swordflakspeed2 0
    swordcooked1 0
    swordcooked2 0
    swordguided1 0
    swordguided2 0
    swordextinguish1 2
    swordextinguish2 2
    swordradial1 0
    swordradial2 0
    swordresidual1 2
    swordresidual2 2
    swordreloads 0
    swordcarried 1
    swordzooms 0
    swordfullauto1 1
    swordfullauto2 1
    swordallowed 2
    swordcritdash1 500
    swordcritdash2 500
    swordtaperin1 0
    swordtaperin2 0
    swordtaperout1 0
    swordtaperout2 0
    swordelasticity1 .5
    swordelasticity2 .5
    swordreflectivity1 0
    swordreflectivity2 0
    swordrelativity1 0
    swordrelativity2 0
    swordwaterfric1 0
    swordwaterfric2 0
    swordweight1 0
    swordweight2 0
    swordradius1 1
    swordradius2 1
    swordkickpush1 0
    swordkickpush2 0
    swordhitpush1 50
    swordhitpush2 100
    swordslow1 0
    swordslow2 0
    swordaidist1 48
    swordaidist2 48
    swordpartsize1 1
    swordpartsize2 1.25
    swordpartlen1 0
    swordpartlen2 0
    swordparttype1 2
    swordparttype2 2
    swordfrequency 1
    swordpusharea 1
    swordcritmult 2
    swordcritdist 0
    sworddelta1 10
    sworddelta2 10
    swordtrace1 3
    swordtrace2 5
    swordheadmin1 0
    swordheadmin2 0
    swordwhipdmg1  .8
    swordwhipdmg2  .8
    swordtorsodmg1 .65
    swordtorsodmg2 .65
    swordlegsdmg1 .3
    swordlegsdmg2 .3
    swordflakscale1 1
    swordflakscale2 1
    swordflakspread1 1
    swordflakspread2 1
    swordflakrel1 1
    swordflakrel2 1
    swordflakffwd1 0
    swordflakffwd2 0
    swordflakoffset1 8
    swordflakoffset2 8
    swordflakskew1 1
    swordflakskew2 1
    swordcollide1 182
    swordcollide2 182
    swordflakcollide1 182
    swordflakcollide2 182
    shotgunname shotgun
    shotguncolour 0x999900
    shotgunpartcol1 0x999900
    shotgunpartcol2 0x999900
    shotgunexplcol1 0x999900
    shotgunexplcol2 0x999900
    shotgunlaser 0
    shotgunadd 2
    shotgunmax 8
    shotgunsub1 1
    shotgunsub2 2
    shotgunadelay1 500
    shotgunadelay2 900
    shotgunrdelay 750
    shotgundamage1 15
    shotgundamage2 4
    shotgunspeed1 1250
    shotgunspeed2 250
    shotgunpower1 0
    shotgunpower2 0
    shotguntime1 400
    shotguntime2 5000
    shotgunpdelay1 0
    shotgunpdelay2 0
    shotgungdelay1 0
    shotgungdelay2 0
    shotgunedelay1 200
    shotgunedelay2 200
    shotgunexplode1 0
    shotgunexplode2 0
    shotgunrays1 10
    shotgunrays2 1
    shotgunspread1 4
    shotgunspread2 2
    shotgunzdiv1 1
    shotgunzdiv2 4
    shotgunaiskew1 10
    shotgunaiskew2 10
    shotgunflakweap1 -1
    shotgunflakweap2 13
    shotgunflakdmg1 16
    shotgunflakdmg2 4
    shotgunflakrays1 5
    shotgunflakrays2 40
    shotgunflaktime1 250
    shotgunflaktime2 2000
    shotgunflakspeed1 0
    shotgunflakspeed2 0
    shotguncooked1 0
    shotguncooked2 0
    shotgunguided1 0
    shotgunguided2 0
    shotgunextinguish1 2
    shotgunextinguish2 2
    shotgunradial1 0
    shotgunradial2 0
    shotgunresidual1 0
    shotgunresidual2 2
    shotgunreloads -1
    shotguncarried 1
    shotgunzooms 0
    shotgunfullauto1 0
    shotgunfullauto2 0
    shotgunallowed 2
    shotguncritdash1 0
    shotguncritdash2 0
    shotguntaperin1 0
    shotguntaperin2 0
    shotguntaperout1 0
    shotguntaperout2 0
    shotgunelasticity1 .5
    shotgunelasticity2 .5
    shotgunreflectivity1 0
    shotgunreflectivity2 0
    shotgunrelativity1 .05
    shotgunrelativity2 .75
    shotgunwaterfric1 2
    shotgunwaterfric2 2
    shotgunweight1 0
    shotgunweight2 250
    shotgunradius1 1
    shotgunradius2 1
    shotgunkickpush1 50
    shotgunkickpush2 75
    shotgunhitpush1 50
    shotgunhitpush2 25
    shotgunslow1 0
    shotgunslow2 0
    shotgunaidist1 256
    shotgunaidist2 512
    shotgunpartsize1 .65
    shotgunpartsize2 .45
    shotgunpartlen1 25
    shotgunpartlen2 15
    shotgunparttype1 3
    shotgunparttype2 3
    shotgunfrequency 1
    shotgunpusharea 1.5
    shotguncritmult 2
    shotguncritdist 256
    shotgundelta1 10
    shotgundelta2 10
    shotguntrace1 1
    shotguntrace2 1
    shotgunheadmin1 0
    shotgunheadmin2 0
    shotgunwhipdmg1 .8
    shotgunwhipdmg2 .9
    shotguntorsodmg1 .6
    shotguntorsodmg2 .7
    shotgunlegsdmg1 .3
    shotgunlegsdmg2 .4
    shotgunflakscale1 1
    shotgunflakscale2 1
    shotgunflakspread1 1
    shotgunflakspread2 .2
    shotgunflakrel1 1
    shotgunflakrel2 1.5
    shotgunflakffwd1 0
    shotgunflakffwd2 0
    shotgunflakoffset1 8
    shotgunflakoffset2 8
    shotgunflakskew1 1
    shotgunflakskew2 1
    shotguncollide1 118
    shotguncollide2 117
    shotgunflakcollide1 118
    shotgunflakcollide2 118
    smgname smg
    smgcolour 0xFF6600
    smgpartcol1 0xFF6600
    smgpartcol2 0xFF6600
    smgexplcol1 0xFF6600
    smgexplcol2 0xFF6600
    smglaser 0
    smgadd 40
    smgmax 40
    smgsub1 1
    smgsub2 4
    smgadelay1 100
    smgadelay2 450
    smgrdelay 1500
    smgdamage1 22
    smgdamage2 4
    smgspeed1 2500
    smgspeed2 450
    smgpower1 0
    smgpower2 0
    smgtime1 750
    smgtime2 500
    smgpdelay1 0
    smgpdelay2 0
    smggdelay1 0
    smggdelay2 100
    smgedelay1 200
    smgedelay2 200
    smgexplode1 0
    smgexplode2 0
    smgrays1 1
    smgrays1 1
    smgspread1 3
    smgspread2 6
    smgzdiv1 2
    smgzdiv2 2
    smgaiskew1 20
    smgaiskew2 20
    smgflakweap1 -1
    smgflakweap2 14
    smgflakdmg1 16
    smgflakdmg2 4
    smgflakrays1 5
    smgflakrays2 35
    smgflaktime1 500
    smgflaktime2 800
    smgflakspeed1 0
    smgflakspeed2 0
    smgcooked1 0
    smgcooked2 0
    smgguided1 0
    smgguided2 0
    smgextinguish1 2
    smgextinguish2 2
    smgradial1 0
    smgradial2 0
    smgresidual1 0
    smgresidual2 0
    smgreloads -1
    smgcarried 1
    smgzooms 0
    smgfullauto1 1
    smgfullauto2 1
    smgallowed 2
    smgcritdash1 0
    smgcritdash2 0
    smgtaperin1 0
    smgtaperin2 0
    smgtaperout1 0
    smgtaperout2 0
    smgelasticity1 .65
    smgelasticity2 .45
    smgreflectivity1 0
    smgreflectivity2 0
    smgrelativity1 .05
    smgrelativity2 .05
    smgwaterfric1 2
    smgwaterfric2 2
    smgweight1 0
    smgweight2 0
    smgradius1 1
    smgradius2 1
    smgkickpush1 5
    smgkickpush2 10
    smghitpush1 50
    smghitpush2 50
    smgslow1 0
    smgslow2 0
    smgaidist1 512
    smgaidist2 96
    smgpartsize1 .5
    smgpartsize2 .35
    smgpartlen1 35
    smgpartlen2 20
    smgparttype1 4
    smgparttype2 4
    smgfrequency 1
    smgpusharea 1.5
    smgcritmult 3
    smgcritdist 128
    smgdelta1 10
    smgdelta2 1000
    smgtrace1 1
    smgtrace2 1
    smgheadmin1 0
    smgheadmin2 0
    smgwhipdmg1 .8
    smgwhipdmg2 .8
    smgtorsodmg1 .7
    smgtorsodmg2 .7
    smglegsdmg1 .35
    smglegsdmg2 .35
    smgflakscale1 1
    smgflakscale2 1
    smgflakspread1 .2
    smgflakspread2 1
    smgflakrel1 1
    smgflakrel2 .05
    smgflakffwd1 0
    smgflakffwd2 0
    smgflakoffset1 8
    smgflakoffset2 8
    smgflakskew1 1
    smgflakskew2 1
    smgcollide1 118
    smgcollide2 117
    smgflakcollide1 118
    smgflakcollide2 118
    flamername flamer
    flamercolour 0xFF2222
    flamerpartcol1 -1
    flamerpartcol2 -1
    flamerexplcol1 -1
    flamerexplcol2 -1
    flamerlaser 0
    flameradd 25
    flamermax 25
    flamersub1 1
    flamersub2 5
    flameradelay1 100
    flameradelay2 500
    flamerrdelay 2000
    flamerdamage1 5
    flamerdamage2 5
    flamerspeed1 300
    flamerspeed2 150
    flamerpower1 0
    flamerpower2 500
    flamertime1 200
    flamertime2 1500
    flamerpdelay1 0
    flamerpdelay2 25
    flamergdelay1 0
    flamergdelay2 0
    flameredelay1 200
    flameredelay2 200
    flamerexplode1 10
    flamerexplode2 10
    flamerrays1 1
    flamerrays2 4
    flamerspread1 5
    flamerspread2 20
    flamerzdiv1 0
    flamerzdiv2 1
    flameraiskew1 10
    flameraiskew2 10
    flamerflakweap1 -1
    flamerflakweap2 -1
    flamerflakdmg1 12
    flamerflakdmg2 4
    flamerflakrays1 5
    flamerflakrays2 5
    flamerflaktime1 1000
    flamerflaktime2 3000
    flamerflakspeed1 200
    flamerflakspeed2 250
    flamercooked1 0
    flamercooked2 1
    flamerguided1 0
    flamerguided2 0
    flamerextinguish1 3
    flamerextinguish2 3
    flamerradial1 25
    flamerradial2 25
    flamerresidual1 1
    flamerresidual2 1
    flamerreloads -1
    flamercarried 1
    flamerzooms 0
    flamerfullauto1 1
    flamerfullauto2 0
    flamerallowed 2
    flamercritdash1 0
    flamercritdash2 0
    flamertaperin1 .5
    flamertaperin2 .5
    flamertaperout1 0
    flamertaperout2 0
    flamerelasticity1 .5
    flamerelasticity2 .35
    flamerreflectivity1 0
    flamerreflectivity2 0
    flamerrelativity1 .95
    flamerrelativity2 .5
    flamerwaterfric1 1
    flamerwaterfric2 1
    flamerweight1 200
    flamerweight2 100
    flamerradius1 1
    flamerradius2 1
    flamerkickpush1 1
    flamerkickpush2 2
    flamerhitpush1 5
    flamerhitpush2 10
    flamerslow1 0
    flamerslow2 0
    flameraidist1 64
    flameraidist2 128
    flamerpartsize1 10
    flamerpartsize2 10
    flamerpartlen1 0
    flamerpartlen2 5
    flamerparttype1 5
    flamerparttype2 5
    flamerfrequency 1
    flamerpusharea 0
    flamercritmult 4
    flamercritdist 64
    flamerdelta1 10
    flamerdelta2 10
    flamertrace1 1
    flamertrace2 1
    flamerheadmin1 4
    flamerheadmin2 4
    flamerwhipdmg1 .65
    flamerwhipdmg2 .65
    flamertorsodmg1 .45
    flamertorsodmg2 .45
    flamerlegsdmg1 .25
    flamerlegsdmg2 .25
    flamerflakscale1 .5
    flamerflakscale2 .5
    flamerflakspread1 .1
    flamerflakspread2 .1
    flamerflakrel1 1
    flamerflakrel2 1
    flamerflakffwd1 .5
    flamerflakffwd2 .5
    flamerflakoffset1 8
    flamerflakoffset2 8
    flamerflakskew1 1
    flamerflakskew2 1
    flamercollide1 70
    flamercollide2 74
    flamerflakcollide1 70
    flamerflakcollide2 74
    plasmaname plasma
    plasmacolour 0x44DDCC
    plasmapartcol1 0x44DDCC
    plasmapartcol2 0x44DDCC
    plasmaexplcol1 0x44DDCC
    plasmaexplcol2 0x44DDCC
    plasmalaser 0
    plasmaadd 20
    plasmamax 20
    plasmasub1 1
    plasmasub2 20
    plasmaadelay1 300
    plasmaadelay2 1000
    plasmardelay 2000
    plasmadamage1 15
    plasmadamage2 10
    plasmaspeed1 1000
    plasmaspeed2 85
    plasmapower1 0
    plasmapower2 2000
    plasmatime1 750
    plasmatime2 5000
    plasmapdelay1 0
    plasmapdelay2 75
    plasmagdelay1 0
    plasmagdelay2 0
    plasmaedelay1 200
    plasmaedelay2 200
    plasmaexplode1 10
    plasmaexplode2 48
    plasmarays1 1
    plasmarays1 1
    plasmaspread1 2
    plasmaspread2 1
    plasmazdiv1 2
    plasmazdiv2 1
    plasmaaiskew1 50
    plasmaaiskew2 10
    plasmaflakweap1 -1
    plasmaflakweap2 -1
    plasmaflakdmg1 10
    plasmaflakdmg2 5
    plasmaflakrays1 5
    plasmaflakrays2 5
    plasmaflaktime1 500
    plasmaflaktime2 500
    plasmaflakspeed1 0
    plasmaflakspeed2 0
    plasmacooked1 0
    plasmacooked2 33
    plasmaguided1 0
    plasmaguided2 0
    plasmaextinguish1 1
    plasmaextinguish2 0
    plasmaradial1 8
    plasmaradial2 100
    plasmaresidual1 0
    plasmaresidual2 0
    plasmareloads -1
    plasmacarried 1
    plasmazooms 0
    plasmafullauto1 1
    plasmafullauto2 0
    plasmaallowed 2
    plasmacritdash1 0
    plasmacritdash2 0
    plasmataperin1 .05
    plasmataperin2 .5
    plasmataperout1 0
    plasmataperout2 .5
    plasmaelasticity1 .5
    plasmaelasticity2 .5
    plasmareflectivity1 0
    plasmareflectivity2 0
    plasmarelativity1 .1
    plasmarelativity2 .1
    plasmawaterfric1 1
    plasmawaterfric2 1
    plasmaweight1 0
    plasmaweight2 0
    plasmaradius1 2
    plasmaradius2 2
    plasmakickpush1 25
    plasmakickpush2 150
    plasmahitpush1 20
    plasmahitpush2 -100
    plasmaslow1 0
    plasmaslow2 .2
    plasmaaidist1 128
    plasmaaidist2 64
    plasmapartsize1 8
    plasmapartsize2 24
    plasmapartlen1 0
    plasmapartlen2 0
    plasmaparttype1 6
    plasmaparttype2 6
    plasmafrequency 1
    plasmapusharea 1.5
    plasmacritmult 2
    plasmacritdist 0
    plasmadelta1 10
    plasmadelta2 10
    plasmatrace1 1
    plasmatrace2 1
    plasmaheadmin1 8
    plasmaheadmin2 4
    plasmawhipdmg1 .6
    plasmawhipdmg2 .6
    plasmatorsodmg1 .4
    plasmatorsodmg2 .4
    plasmalegsdmg1 .2
    plasmalegsdmg2 .2
    plasmaflakscale1 1
    plasmaflakscale2 1
    plasmaflakspread1 1
    plasmaflakspread2 1
    plasmaflakrel1 1
    plasmaflakrel2 1
    plasmaflakffwd1 0
    plasmaflakffwd2 0
    plasmaflakoffset1 8
    plasmaflakoffset2 8
    plasmaflakskew1 1
    plasmaflakskew2 1
    plasmacollide1 85
    plasmacollide2 337
    plasmaflakcollide1 85
    plasmaflakcollide2 337
    riflename rifle
    riflecolour 0x8822DD
    riflepartcol1 0x8822DD
    riflepartcol2 0x8822DD
    rifleexplcol1 0x8822DD
    rifleexplcol2 0x8822DD
    riflelaser 0
    rifleadd 5
    riflemax 5
    riflesub1 1
    riflesub2 1
    rifleadelay1 750
    rifleadelay2 1000
    riflerdelay 1750
    rifledamage1 32
    rifledamage2 150
    riflespeed1 10000
    riflespeed2 100000
    riflepower1 0
    riflepower2 0
    rifletime1 5000
    rifletime2 5000
    riflepdelay1 0
    riflepdelay2 0
    riflegdelay1 0
    riflegdelay2 0
    rifleedelay1 200
    rifleedelay2 200
    rifleexplode1 32
    rifleexplode2 0
    riflerays1 1
    riflerays1 1
    riflespread1 1
    riflespread2 0
    riflezdiv1 0
    riflezdiv2 0
    rifleaiskew1 40
    rifleaiskew2 40
    rifleflakweap1 -1
    rifleflakweap2 -1
    rifleflakdmg1 18
    rifleflakdmg2 50
    rifleflakrays1 5
    rifleflakrays2 5
    rifleflaktime1 500
    rifleflaktime2 500
    rifleflakspeed1 0
    rifleflakspeed2 0
    riflecooked1 0
    riflecooked2 0
    rifleguided1 0
    rifleguided2 0
    rifleextinguish1 2
    rifleextinguish2 2
    rifleradial1 0
    rifleradial2 0
    rifleresidual1 0
    rifleresidual2 0
    riflereloads -1
    riflecarried 1
    riflezooms 1
    riflefullauto1 0
    riflefullauto2 0
    rifleallowed 2
    riflecritdash1 0
    riflecritdash2 0
    rifletaperin1 0
    rifletaperin2 0
    rifletaperout1 0
    rifletaperout2 0
    rifleelasticity1 .5
    rifleelasticity2 .5
    riflereflectivity1 0
    riflereflectivity2 0
    riflerelativity1 1
    riflerelativity2 0
    riflewaterfric1 2
    riflewaterfric2 2
    rifleweight1 0
    rifleweight2 0
    rifleradius1 1
    rifleradius2 1
    riflekickpush1 50
    riflekickpush2 50
    riflehitpush1 50
    riflehitpush2 100
    rifleslow1 0
    rifleslow2 0
    rifleaidist1 768
    rifleaidist2 2048
    riflepartsize1 1.5
    riflepartsize2 3
    riflepartlen1 256
    riflepartlen2 512
    rifleparttype1 7
    rifleparttype2 7
    riflefrequency 1
    riflepusharea 1.5
    riflecritmult 2
    riflecritdist 1024
    rifledelta1 10
    rifledelta2 10
    rifletrace1 1
    rifletrace2 1
    rifleheadmin1 4
    rifleheadmin2 4
    riflewhipdmg1 .75
    riflewhipdmg2 .75
    rifletorsodmg1 .5
    rifletorsodmg2 .5
    riflelegsdmg1 .3
    riflelegsdmg2 .3
    rifleflakscale1 1
    rifleflakscale2 1
    rifleflakspread1 .25
    rifleflakspread2 .25
    rifleflakrel1 1
    rifleflakrel2 1
    rifleflakffwd1 0
    rifleflakffwd2 0
    rifleflakoffset1 8
    rifleflakoffset2 8
    rifleflakskew1 1
    rifleflakskew2 1
    riflecollide1 117
    riflecollide2 181
    rifleflakcollide1 117
    rifleflakcollide2 181
    grenadename grenade
    grenadecolour 0x119911
    grenadepartcol1 -1
    grenadepartcol2 -1
    grenadeexplcol1 0x981808
    grenadeexplcol2 0x981808
    grenadeadd 1
    grenademax 2
    grenadesub1 1
    grenadesub2 1
    grenadeadelay1 1000
    grenadeadelay2 1000
    grenaderdelay 1500
    grenadedamage1 100
    grenadedamage2 100
    grenadespeed1 250
    grenadespeed2 250
    grenadepower1 3000
    grenadepower2 3000
    grenadetime1 3000
    grenadetime2 3000
    grenadepdelay1 75
    grenadepdelay2 75
    grenadegdelay1 0
    grenadegdelay2 0
    grenadeedelay1 200
    grenadeedelay2 200
    grenadeexplode1 75
    grenadeexplode2 75
    grenaderays1 1
    grenaderays1 1
    grenadespread1 1
    grenadespread2 1
    grenadezdiv1 0
    grenadezdiv2 0
    grenadeaiskew1 5
    grenadeaiskew2 5
    grenadeflakweap1 3
    grenadeflakweap2 3
    grenadeflakdmg1 150
    grenadeflakdmg2 150
    grenadeflakrays1 75
    grenadeflakrays2 75
    grenadeflaktime1 3000
    grenadeflaktime2 3000
    grenadeflakspeed1 300
    grenadeflakspeed2 300
    grenadecooked1 8
    grenadecooked2 8
    grenadeguided1 0
    grenadeguided2 0
    grenadeextinguish1 2
    grenadeextinguish2 2
    grenaderadial1 0
    grenaderadial2 0
    grenaderesidual1 1
    grenaderesidual2 1
    grenadereloads 0
    grenadecarried 0
    grenadezooms 0
    grenadefullauto1 0
    grenadefullauto2 0
    grenadeallowed 3
    grenadecritdash1 0
    grenadecritdash2 0
    grenadetaperin1 0
    grenadetaperin2 0
    grenadetaperout1 0
    grenadetaperout2 0
    grenadeelasticity1 .5
    grenadeelasticity2 .5
    grenadereflectivity1 0
    grenadereflectivity2 0
    grenaderelativity1 1
    grenaderelativity2 1
    grenadewaterfric1 2
    grenadewaterfric2 2
    grenadeweight1 65
    grenadeweight2 65
    grenaderadius1 1
    grenaderadius2 1
    grenadekickpush1 5
    grenadekickpush2 5
    grenadehitpush1 250
    grenadehitpush2 250
    grenadeslow1 0
    grenadeslow2 0
    grenadeaidist1 384
    grenadeaidist2 256
    grenadepartsize1 1
    grenadepartsize2 1
    grenadepartlen1 0
    grenadepartlen2 0
    grenadeparttype1 8
    grenadeparttype2 8
    grenadefrequency 2
    grenadepusharea 2
    grenadecritmult 2
    grenadecritdist 0
    grenadedelta1 10
    grenadedelta2 10
    grenadetrace1 1
    grenadetrace2 1
    grenadeheadmin1 8
    grenadeheadmin2 8
    grenadewhipdmg1 .6
    grenadewhipdmg2 .6
    grenadetorsodmg1 .4
    grenadetorsodmg2 .4
    grenadelegsdmg1 .2
    grenadelegsdmg2 .2
    grenadeflakscale1 1
    grenadeflakscale2 1
    grenadeflakspread1 1
    grenadeflakspread2 1
    grenadeflakrel1 0
    grenadeflakrel2 0
    grenadeflakffwd1 0
    grenadeflakffwd2 0
    grenadeflakoffset1 0
    grenadeflakoffset2 0
    grenadeflakskew1 1
    grenadeflakskew2 1
    grenadecollide1 602
    grenadecollide2 853
    grenadeflakcollide1 597
    grenadeflakcollide2 853
    rocketname rocket
    rocketcolour 0xAA3300
    rocketpartcol1 -1
    rocketpartcol2 -1
    rocketexplcol1 0x981808
    rocketexplcol2 0x981808
    rocketlaser 0
    rocketadd 1
    rocketmax 1
    rocketsub1 1
    rocketsub2 1
    rocketadelay1 1000
    rocketadelay2 1000
    rocketrdelay 1500
    rocketdamage1 150
    rocketdamage2 150
    rocketspeed1 1000
    rocketspeed2 250
    rocketpower1 2000
    rocketpower2 2000
    rockettime1 5000
    rockettime2 5000
    rocketpdelay1 0
    rocketpdelay2 0
    rocketgdelay1 0
    rocketgdelay2 0
    rocketedelay1 200
    rocketedelay2 200
    rocketexplode1 100
    rocketexplode2 100
    rocketrays1 1
    rocketrays1 1
    rocketspread1 1
    rocketspread2 1
    rocketzdiv1 0
    rocketzdiv2 0
    rocketaiskew1 10
    rocketaiskew2 10
    rocketflakweap1 4
    rocketflakweap2 4
    rocketflakdmg1 300
    rocketflakdmg2 300
    rocketflakrays1 75
    rocketflakrays2 75
    rocketflaktime1 3000
    rocketflaktime2 3000
    rocketflakspeed1 400
    rocketflakspeed2 400
    rocketcooked1 8
    rocketcooked2 8
    rocketguided1 0
    rocketguided2 1
    rocketextinguish1 2
    rocketextinguish2 2
    rocketradial1 0
    rocketradial2 0
    rocketresidual1 1
    rocketresidual2 1
    rocketreloads 0
    rocketcarried 1
    rocketfullauto1 0
    rocketfullauto2 0
    rocketallowed 3
    rocketcritdash1 0
    rocketcritdash2 0
    rockettaperin1 0
    rockettaperin2 0
    rockettaperout1 0
    rockettaperout2 0
    rocketcollide1 597
    rocketcollide2 597
    rocketelasticity1 .5
    rocketelasticity2 .5
    rocketreflectivity1 0
    rocketreflectivity2 0
    rocketrelativity1 0
    rocketrelativity2 0
    rocketwaterfric1 2
    rocketwaterfric2 2
    rocketweight1 0
    rocketweight2 0
    rocketradius1 1
    rocketradius2 1
    rocketkickpush1 150
    rocketkickpush2 150
    rockethitpush1 500
    rockethitpush2 500
    rocketslow1 0
    rocketslow2 0
    rocketaidist1 1024
    rocketaidist2 512
    rocketpartsize1 3
    rocketpartsize2 3
    rocketpartlen1 0
    rocketpartlen2 0
    rocketparttype1 9
    rocketparttype2 9
    rocketfrequency 4
    rocketpusharea 4
    rocketcritmult 2
    rocketcritdist 0
    rocketdelta1 10
    rocketdelta2 10
    rockettrace1 1
    rockettrace2 1
    rocketheadmin1 16
    rocketheadmin2 16
    rocketwhipdmg1 .6
    rocketwhipdmg2 .6
    rockettorsodmg1 .4
    rockettorsodmg2 .4
    rocketlegsdmg1 .2
    rocketlegsdmg2 .2
    rocketflakscale1 1
    rocketflakscale2 1
    rocketflakspread1 1
    rocketflakspread2 1
    rocketflakrel1 0
    rocketflakrel2 0
    rocketflakffwd1 0
    rocketflakffwd2 0
    rocketflakoffset1 0
    rocketflakoffset2 0
    rocketflakskew1 1
    rocketflakskew2 1
    rocketflakcollide1 597
    rocketflakcollide2 597
    rocketzooms 0
Last edited by bonifarz on 29 Mar 2013, 12:19, edited 4 times in total.
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Re: Porting weapon vars from 1.3 to 1.4

Postby arand » 26 Mar 2013, 22:39

I have used word-diffing in order to create a list of all the changes of vars from 1.3.1 to 1.4, which is available on the wiki:
http://redeclipse.net/wiki/Vars_Changes_1.3.1_to_1.4

This might be helpful in figuring out what happened to renamed and changed variables over versions. I've used it extensively in trying to keep up with the weapon balance changes in order to write the changelog for example ;) (though probably not succeeded fully).

Note that it's automatically generated, so the grouping is very naive and not guaranteed to keep related variables next to each other. Note also that in some cases changes can span multiple lines.
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: Porting weapon vars from 1.3 to 1.4

Postby bonifarz » 27 Mar 2013, 08:31

Yeah, I noticed those "SVN" wiki pages just a few hours after posting this. Thanks for your efforts to automatize the updates for the wiki from the sources, it seems very useful to me. Also, the comparison of the new pistolvars with the previous variables was quite helpful in this context here.

Also, I just realize ZeroKnight once took the time to export all default values of weapon vars in 1.3 (as part of the Simple WeapMod GUI), which should actually be an essential ingredient for a script like this one here. However, the link on his mod archive topic is dead, so I hope he still has a copy of those.

EDIT: Ah, I think I just found that one... or maybe the defaults were part of Xaran's mod menu? Either way, I inserted it above.
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Re: Porting weapon vars from 1.3 to 1.4

Postby bonifarz » 29 Mar 2013, 12:11

Heya fellow weapon modders.

I could not resist to tinker with this silly awk script. The update includes a hopefully correct conversion of the collide and fragcollde variables and an END block to ensure all of the new flak variables are consistent with the values you have assigned in your mod. Things that do not seem to work as expected are tapering times and attractive forces from implosions. I will take another look at this later, but I think most of the old weapon mods will work quite reasonably with this one.
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Re: Porting weapon vars from 1.3 to 1.4

Postby qreeves » 29 Mar 2013, 12:50

bonifarz {l Wrote}:and attractive forces from implosions.

That is actually a bug I fixed today.
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Who is online

Users browsing this forum: No registered users and 1 guest

cron