(WIP) Auto gun coder

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Prodigy

FNG / Fresh Meat
Feb 28, 2010
239
4
0
Umbrella Corp. HQ
ok, so i decided to make this auto gun coder which will generate the UnrealScript code necessary to make a functional gun based on specifics defined by the user. I was sharing this with some friends, and somebody mentioned how it would spark everyone to start making guns because its so user friendly, and i didnt want a bunch of stupidly overpowered guns coming out so i put in this feature. then i was staring at it and realized how funny it was.

256s2l1.jpg


notice how the only option is "Ok"

oh also, does anyone know if a weapon can extend on another weapon? i THINK it can but im not sure.

one more thing, if any of you out there are by chance experienced with VB.net AND UnrealScript, care to help me out with some pointers? (i think im the only one in the entire community who knows VB.Net and UScript LLOOOOL)
 
Last edited:

Prodigy

FNG / Fresh Meat
Feb 28, 2010
239
4
0
Umbrella Corp. HQ
ok, i added the feature to be able to specify custom fire, so if you want your shotgun to shoot grenades, then by all means go ahead.

the code is an example of using the auto coder to make a shotgun that's alt fire shoots grenades.

akjvpv.jpg


if you are curious how i added it here it is the code


If CheckBox1.Checked = True Then TextBox2.AppendText(Environment.NewLine & "FireModeClass(0)=Class'" & TextBox3.Text & "'") Else TextBox2.AppendText(Environment.NewLine & "FireModeClass(0)=Class'" & modname.Text & "." & TextBox1.Text & "Fire'")

If CheckBox2.Checked = True Then TextBox2.AppendText(Environment.NewLine & "FireModeClass(1)=Class'" & TextBox4.Text & "'") Else TextBox2.AppendText(Environment.NewLine & "FireModeClass(1)=Class'" & modname.Text & "." & TextBox1.Text & "Fire'")
 
Last edited:

Yoshiro

Senior Community Manager
Staff member
Oct 10, 2005
13,355
4,064
113
Nice work! Does this set it up for use in the store as well?
 

Prodigy

FNG / Fresh Meat
Feb 28, 2010
239
4
0
Umbrella Corp. HQ
well, this is a work in progress. basically, im going to need to set up 2 programs, simply because i cannot fit all the options and textboxes into one, but when this is finished it should be so that you just specify everything, and click generate code, and then when everything looks good there will be an "Export to .uc" button, which will copy all the text to a new file and save as .uc's to a specified directory. It's far from done but i hope the community can benefit from it!
 

Yoshiro

Senior Community Manager
Staff member
Oct 10, 2005
13,355
4,064
113
I have no doubt it would benefit the community! Keep up the work!
 

9_6

FNG / Fresh Meat
Sep 4, 2009
2,461
727
0
Ah this is good.
Now if someone thinks things need to be changed, they can easily make a mutator and say "there, see for yourself, this is how things are supposed to be" instead of having a lengthy discussion, speculating how that variable shift might influence gameplay.
 

Prodigy

FNG / Fresh Meat
Feb 28, 2010
239
4
0
Umbrella Corp. HQ
Ah this is good.
Now if someone thinks things need to be changed, they can easily make a mutator and say "there, see for yourself, this is how things are supposed to be" instead of having a lengthy discussion, speculating how that variable shift might influence gameplay.

exactly.

also, i hope to spark community interest, so more people will want to make muts and models and such.
 

Falidell

FNG / Fresh Meat
May 22, 2009
646
78
0
32
Mesa,Az,USA
this is ****ing nice! exelent idea and work brah :)

also
oh also, does anyone know if a weapon can extend on another weapon?
of course. yes, but in general you want to keep the main/ very basic scripting for the class in the parent class and all the specific detail stuff in the child class.

edit: also, i can pretty much gather that you already know this but i'm gona tell you anyways just in case. everything in the parent classes transfers down to the child class. and the modifications, additions, etc. made to the child/ child's childs classes don't effect the parent class
 
Last edited:

Prodigy

FNG / Fresh Meat
Feb 28, 2010
239
4
0
Umbrella Corp. HQ
2zyg9bl.jpg


ahh, its coming along!

btw, all those drop downs have all the choices coded into them

example: the drop down on the Damage Type has
KFMod.DamTypeAA12Shotgun
KFMod.DamTypeAK47AssaultRifle
KFMod.DamTypeAxe
KFMod.DamTypeBleedOut
KFMod.DamTypeBullpup
KFMod.DamTypeBurned
KFMod.DamTypeChainsaw
KFMod.DamTypeCrossbow
KFMod.DamTypeCrossbowHeadShot
KFMod.DamTypeDBShotgun
KFMod.DamTypeDeagle
KFMod.DamTypeDecapitation
KFMod.DamTypeDualDeagle
KFMod.DamTypeDualies
KFMod.DamTypeFlameNade
KFMod.DamTypeFlamethrower
KFMod.DamTypeFrag
KFMod.DamTypeKatana
KFMod.DamTypeKFSnipe
KFMod.DamTypeKnife
KFMod.DamTypeLAW
KFMod.DamTypeM14EBR
KFMod.DamTypeM32Grenade
KFMod.DamTypeM79Grenade
KFMod.DamTypeMachete
KFMod.DamTypeMelee
KFMod.DamTypeMeleeDecapitation
KFMod.DamTypeMP7M
KFMod.DamTypePipeBomb
KFMod.DamTypePoundCrushed
KFMod.DamTypeRocketImpact
etc.
 
Last edited:

Prodigy

FNG / Fresh Meat
Feb 28, 2010
239
4
0
Umbrella Corp. HQ
success!
i will finish tomo ;)
10z1v6c.jpg


source code:

Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)



    End Sub

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox2.Text = ("class " & gunname.Text & " extends " & ComboBox1.Text & ";")
        TextBox2.AppendText(Environment.NewLine & "defaultproperties")
        TextBox2.AppendText(Environment.NewLine & "{")
        TextBox2.AppendText(Environment.NewLine & "PickupClass=Class'" & modname.Text & "." & gunname.Text & "Pickup'")
        TextBox2.AppendText(Environment.NewLine & "Weight=" & weight.Text)
        TextBox2.AppendText(Environment.NewLine & "MagCapacity=" & magazinecapacity.Text)
        If CheckBox1.Checked = True Then TextBox2.AppendText(Environment.NewLine & "FireModeClass(0)=Class'" & TextBox3.Text & "'") Else TextBox2.AppendText(Environment.NewLine & "FireModeClass(0)=Class'" & modname.Text & "." & gunname.Text & "Fire'")
        If CheckBox2.Checked = True Then TextBox2.AppendText(Environment.NewLine & "FireModeClass(1)=Class'" & TextBox4.Text & "'") Else TextBox2.AppendText(Environment.NewLine & "FireModeClass(1)=Class'" & modname.Text & "." & gunname.Text & "Fire'")
        If CheckBox5.Checked = True Then TextBox2.AppendText(Environment.NewLine & "PlayerViewOffset=(X=" & TextBox1.Text & ",Y=" & TextBox12.Text & ",Z=" & TextBox14.Text & ")")
        If CheckBox6.Checked = True Then TextBox2.AppendText(Environment.NewLine & "Mesh=SkeletalMesh'" & TextBox15.Text & "'")
        TextBox2.AppendText(Environment.NewLine & "}")
        If magazinecapacity.Text > 99 Then MessageBox.Show("Hey brah, i noticed ur ammo was like over 100 and stuff. generally, guns that arent overpowered dont have that much ammo ;). no dumb OP mods pl0x.")

        


    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = False Then TextBox3.Enabled = False Else If CheckBox1.Checked = True Then TextBox3.Enabled = True


    End Sub

    Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
        If CheckBox2.Checked = False Then TextBox4.Enabled = False Else If CheckBox2.Checked = True Then TextBox4.Enabled = True
    End Sub

    Private Sub Label6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label6.Click

    End Sub

    Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
        If CheckBox4.Checked = True Then TextBox13.Enabled = True
        If CheckBox4.Checked = True Then ComboBox2.Enabled = False
        If CheckBox4.Checked = False Then TextBox13.Enabled = False
        If CheckBox4.Checked = False Then ComboBox2.Enabled = True




    End Sub

    Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
        If CheckBox5.Checked = True Then TextBox1.Enabled = True
        If CheckBox5.Checked = True Then TextBox12.Enabled = True
        If CheckBox5.Checked = True Then TextBox14.Enabled = True
        If CheckBox5.Checked = False Then TextBox1.Enabled = False
        If CheckBox5.Checked = False Then TextBox12.Enabled = False
        If CheckBox5.Checked = False Then TextBox14.Enabled = False
    End Sub

    Private Sub CheckBox6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox6.CheckedChanged
        If CheckBox6.Enabled = True Then TextBox15.Enabled = True
        If CheckBox6.Enabled = False Then TextBox15.Enabled = False

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox5.Text = ("class " & gunname.Text & "Fire" & " extends " & ComboBox3.Text & ";")
        TextBox5.AppendText(Environment.NewLine & "defaultproperties")
        TextBox5.AppendText(Environment.NewLine & "{")
        TextBox5.AppendText(Environment.NewLine & "RecoilRate=" & TextBox6.Text)
        If CheckBox4.Checked = True Then TextBox5.AppendText(Environment.NewLine & "DamageType=Class'" & TextBox13.Text & "'") Else TextBox5.AppendText(Environment.NewLine & "DamageType=Class'KFMod.DamType" & ComboBox2.Text)
        TextBox5.AppendText(Environment.NewLine & "DamageMin=" & TextBox7.Text)
        TextBox5.AppendText(Environment.NewLine & "DamageMax=" & TextBox8.Text)
        If CheckBox3.Checked = True Then TextBox5.AppendText(Environment.NewLine & "AmmoClass=Class'" & TextBox9.Text & "Ammo'") Else TextBox5.AppendText(Environment.NewLine & "AmmoClass=Class'" & modname.Text & "." & gunname.Text & "Ammo'")
        TextBox5.AppendText(Environment.NewLine & "FireRate=" & TextBox10.Text)
        TextBox5.AppendText(Environment.NewLine & "AmmoPerFire=" & TextBox11.Text)
        TextBox5.AppendText(Environment.NewLine & "}")


    End Sub
End Class
 
Last edited:

9_6

FNG / Fresh Meat
Sep 4, 2009
2,461
727
0
Is it just me or is this lacking the total ammunition that shooter has?
For instance, I see no possibility to lower the m14 ammo or how much ammo the xbow gets from crates.
 
Last edited:

Prodigy

FNG / Fresh Meat
Feb 28, 2010
239
4
0
Umbrella Corp. HQ
the title says (WIP)
its not done yet lol.

the first part only covers the main gun code, and the gun fire code, the second part is almost finished and i should be done with this in like an hour or so.

aw crap, due to some stupid error about how it doesnt have access, i cant have a "Dump Text to .UC" button. >:O

MUAHAHAHAHAHAHAHAHA

AFTER 4 HOURS OF BROWSING OVER 100 CODING WEBSITES, I FINALLY FOUND THE CODE TO DUMP TO .UC!!!!
YES!!!!!!!!!
 
Last edited:
  • Like
Reactions: xVenomFang

xVenomFang

FNG / Fresh Meat
Aug 1, 2011
83
17
0
success!
i will finish tomo ;)
10z1v6c.jpg


source code:

Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)



    End Sub

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox2.Text = ("class " & gunname.Text & " extends " & ComboBox1.Text & ";")
        TextBox2.AppendText(Environment.NewLine & "defaultproperties")
        TextBox2.AppendText(Environment.NewLine & "{")
        TextBox2.AppendText(Environment.NewLine & "PickupClass=Class'" & modname.Text & "." & gunname.Text & "Pickup'")
        TextBox2.AppendText(Environment.NewLine & "Weight=" & weight.Text)
        TextBox2.AppendText(Environment.NewLine & "MagCapacity=" & magazinecapacity.Text)
        If CheckBox1.Checked = True Then TextBox2.AppendText(Environment.NewLine & "FireModeClass(0)=Class'" & TextBox3.Text & "'") Else TextBox2.AppendText(Environment.NewLine & "FireModeClass(0)=Class'" & modname.Text & "." & gunname.Text & "Fire'")
        If CheckBox2.Checked = True Then TextBox2.AppendText(Environment.NewLine & "FireModeClass(1)=Class'" & TextBox4.Text & "'") Else TextBox2.AppendText(Environment.NewLine & "FireModeClass(1)=Class'" & modname.Text & "." & gunname.Text & "Fire'")
        If CheckBox5.Checked = True Then TextBox2.AppendText(Environment.NewLine & "PlayerViewOffset=(X=" & TextBox1.Text & ",Y=" & TextBox12.Text & ",Z=" & TextBox14.Text & ")")
        If CheckBox6.Checked = True Then TextBox2.AppendText(Environment.NewLine & "Mesh=SkeletalMesh'" & TextBox15.Text & "'")
        TextBox2.AppendText(Environment.NewLine & "}")
        If magazinecapacity.Text > 99 Then MessageBox.Show("Hey brah, i noticed ur ammo was like over 100 and stuff. generally, guns that arent overpowered dont have that much ammo ;). no dumb OP mods pl0x.")

        


    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = False Then TextBox3.Enabled = False Else If CheckBox1.Checked = True Then TextBox3.Enabled = True


    End Sub

    Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
        If CheckBox2.Checked = False Then TextBox4.Enabled = False Else If CheckBox2.Checked = True Then TextBox4.Enabled = True
    End Sub

    Private Sub Label6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label6.Click

    End Sub

    Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
        If CheckBox4.Checked = True Then TextBox13.Enabled = True
        If CheckBox4.Checked = True Then ComboBox2.Enabled = False
        If CheckBox4.Checked = False Then TextBox13.Enabled = False
        If CheckBox4.Checked = False Then ComboBox2.Enabled = True




    End Sub

    Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
        If CheckBox5.Checked = True Then TextBox1.Enabled = True
        If CheckBox5.Checked = True Then TextBox12.Enabled = True
        If CheckBox5.Checked = True Then TextBox14.Enabled = True
        If CheckBox5.Checked = False Then TextBox1.Enabled = False
        If CheckBox5.Checked = False Then TextBox12.Enabled = False
        If CheckBox5.Checked = False Then TextBox14.Enabled = False
    End Sub

    Private Sub CheckBox6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox6.CheckedChanged
        If CheckBox6.Enabled = True Then TextBox15.Enabled = True
        If CheckBox6.Enabled = False Then TextBox15.Enabled = False

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox5.Text = ("class " & gunname.Text & "Fire" & " extends " & ComboBox3.Text & ";")
        TextBox5.AppendText(Environment.NewLine & "defaultproperties")
        TextBox5.AppendText(Environment.NewLine & "{")
        TextBox5.AppendText(Environment.NewLine & "RecoilRate=" & TextBox6.Text)
        If CheckBox4.Checked = True Then TextBox5.AppendText(Environment.NewLine & "DamageType=Class'" & TextBox13.Text & "'") Else TextBox5.AppendText(Environment.NewLine & "DamageType=Class'KFMod.DamType" & ComboBox2.Text)
        TextBox5.AppendText(Environment.NewLine & "DamageMin=" & TextBox7.Text)
        TextBox5.AppendText(Environment.NewLine & "DamageMax=" & TextBox8.Text)
        If CheckBox3.Checked = True Then TextBox5.AppendText(Environment.NewLine & "AmmoClass=Class'" & TextBox9.Text & "Ammo'") Else TextBox5.AppendText(Environment.NewLine & "AmmoClass=Class'" & modname.Text & "." & gunname.Text & "Ammo'")
        TextBox5.AppendText(Environment.NewLine & "FireRate=" & TextBox10.Text)
        TextBox5.AppendText(Environment.NewLine & "AmmoPerFire=" & TextBox11.Text)
        TextBox5.AppendText(Environment.NewLine & "}")


    End Sub
End Class
anyone successfully got this into vb yet? cuz i'm getting 102+ errors when i c+p it in there
also sorry for bumping
 

braindead

FNG / Fresh Meat
Aug 22, 2009
918
346
0
Merry Ol' England
oh and I like how it sais your on vacation too lol

huh?? prodigy is banned hence the vacation, and check his last post, almost a year old.
xvenomfang is having trouble compiling it and i haven't seen anywhere since his post that says it works? :confused: what thread are you reading sorrow?:rolleyes:
 

xVenomFang

FNG / Fresh Meat
Aug 1, 2011
83
17
0
huh?? prodigy is banned hence the vacation, and check his last post, almost a year old.
xvenomfang is having trouble compiling it and i haven't seen anywhere since his post that says it works? :confused: what thread are you reading sorrow?:rolleyes:

well ima try compiling it w/ ucc but is ucc compiling only used for mutators?

Edit: ok i have no idea how i am supposed to do this so can someone help me? i don't know how exactly i'm supposed to compile this with ucc.exe because this isn't a mutator to the best of my knowledge
 
Last edited: