Ludeon Forums

Ludeon Forums

  • August 05, 2021, 07:36:54 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modifying weapon values?  (Read 7708 times)

Woyzeck

  • Drifter
  • **
  • Posts: 42
  • Refugee
    • View Profile
Modifying weapon values?
« on: November 28, 2013, 03:02:14 PM »

I.e. range, damage, accuracy, etc. Is there a way to do this at the present time? I've seen how you can change which weapon is used by turrets in Plasmatic's thread, but while poking around with a .dll editor, I couldn't find any of the weapons themselves in Assembly-CSharp.dll.
Logged

Rhodes

  • Drifter
  • **
  • Posts: 74
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #1 on: November 29, 2013, 10:01:16 AM »

Push F3 and search Methods for Definitions_Guns.  You'll want the grayed-out c_Iterator version.  Expand it and select MoveNext(): Boolean.  You'll find all your values there.
Logged

Woyzeck

  • Drifter
  • **
  • Posts: 42
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #2 on: November 30, 2013, 04:28:24 AM »

I'm using JustDecompile with the Reflexil plugin, could this be the reason why I'm not seeing what you're pointing me towards? Should "Movenext(): Boolean" be in the code of the .dll, or is that a control in Reflector?

The closest thing I can find to what you describe is this little bit, under "ThingDefsHardcoded":

public static IEnumerable<ThingDefinition> Definitions_Guns()
    {
        ThingDefsHardcoded.<Definitions_Guns>c__Iterator29 variable = null;
        return variable;
    }

But that's all I get; no list, no variables. Searching for the weapons by their names (Gun_Uzi, for example), gets no results either.
Logged

why1do

  • Drifter
  • **
  • Posts: 28
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #3 on: November 30, 2013, 05:50:14 AM »

I'm using JustDecompile with the Reflexil plugin, could this be the reason why I'm not seeing what you're pointing me towards? Should "Movenext(): Boolean" be in the code of the .dll, or is that a control in Reflector?

The closest thing I can find to what you describe is this little bit, under "ThingDefsHardcoded":

public static IEnumerable<ThingDefinition> Definitions_Guns()
    {
        ThingDefsHardcoded.<Definitions_Guns>c__Iterator29 variable = null;
        return variable;
    }

But that's all I get; no list, no variables. Searching for the weapons by their names (Gun_Uzi, for example), gets no results either.

Have you enabled Reflexil (is their a lower box with functions that look like "Image")
If yes scroll till you find what you want to change (may take some time)
If no go to tools(if it is the same as reflector) and click on Reflexil V(version number)

[attachment deleted by admin: too old]
Logged

Littlemule

  • Drifter
  • **
  • Posts: 21
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #4 on: November 30, 2013, 06:32:53 AM »

Hi I'm at this point too using the reflexil plugin too, once here how is it possible to edit the values to the particular weapons ? Sorry if that is alittle vague any help would be good.
Logged

Woyzeck

  • Drifter
  • **
  • Posts: 42
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #5 on: November 30, 2013, 03:20:38 PM »

Have you enabled Reflexil

Yes.

If yes scroll till you find what you want to change

Cannot do. What I want to change isn't showing anywhere. I can find power plants and solar panels, I can find the skills and their rates of experience gain, and so on, but the guns simply do not appear anywhere.
Logged

why1do

  • Drifter
  • **
  • Posts: 28
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #6 on: December 01, 2013, 03:09:19 PM »

Have you enabled Reflexil

Yes.

If yes scroll till you find what you want to change

Cannot do. What I want to change isn't showing anywhere. I can find power plants and solar panels, I can find the skills and their rates of experience gain, and so on, but the guns simply do not appear anywhere.
for guns IMAGE1

for exp. Stuff IMAGE2

[attachment deleted by admin: too old]
Logged

Woyzeck

  • Drifter
  • **
  • Posts: 42
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #7 on: December 06, 2013, 03:33:11 AM »

Thanks all for the replies. The problem appears to have been JustDecompile itself. Downloaded the trial version of .Net Reflector and was able to find the variables without difficulty. Only problem I've noticed there is that the variable for the number of shots per burst can't be changed; the variable is there, the code up top shows its value, but the Reflexil box just shows the value field as blank and won't save any changes to it.
Logged

why1do

  • Drifter
  • **
  • Posts: 28
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #8 on: December 06, 2013, 11:08:41 PM »

Thanks all for the replies. The problem appears to have been JustDecompile itself. Downloaded the trial version of .Net Reflector and was able to find the variables without difficulty. Only problem I've noticed there is that the variable for the number of shots per burst can't be changed; the variable is there, the code up top shows its value, but the Reflexil box just shows the value field as blank and won't save any changes to it.

Some guns have burst "uzi" and some don't
Logged

Littlemule

  • Drifter
  • **
  • Posts: 21
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #9 on: December 07, 2013, 04:43:35 PM »

I found this too, I worked out that by looking at the M16's burst value (which was editable) I was able to translate that to the uzi which had no editable burst value. You have to actually change one of the tab settings from the default setting in Reflexil.  I'll post some pics when I'm home
Logged

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #10 on: December 10, 2013, 01:00:11 AM »

This may sound noobish, but...

Once you've made the changes you want to with Reflector w/ Reflexil active, how do you save those changes so that it remains in the .dll file?
Logged

Motorkingpus

  • Drifter
  • **
  • Posts: 37
  • Eegufer
    • View Profile
Re: Modifying weapon values?
« Reply #11 on: December 10, 2013, 09:05:25 AM »

You right click on the Assembly file, and do as the following picture.

Logged

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Re: Modifying weapon values?
« Reply #12 on: December 23, 2013, 03:06:51 AM »

@littlemule; that would be awesome if you could. I can't figure it out myself and would love to know.
Logged