The idea of the global modification?

Started by ishism, May 24, 2020, 03:35:04 PM

Previous topic - Next topic

ishism

How are global property changes created?

I am interested in how this works.
That is, for example, there are mods that add an additional button with an action to each pawn when clicked

Some change the properties of all objects of a certain class (for example, add simulation of physics to bullets)

This, obviously, is not done through xml, and certainly is not done by inheriting a class with changing properties (this is just cloning with redefinition of properties, like adding an item to a game, then with a lot of fields). It's also unlikely that everything will change if I just write my class and don't tie it anywhere.

So how are the replacements made? Can anyone show a minimalistic example of global change? For example, add a field with information for each object of the type that is already in the game, or something else like that

RawCode

it called "dll mods" and there is sticky thread about it.

also you should check wiki for more basic tips, due to nature of code based mods you may need to read book or two about c# and if you ever decide to go into code injection about x64 assembler and CLI internals before reading harmony docs to actually understand how it works.

LWM

It *really* depends on what's being changed.

But the general procedure is to find where in the code that aspect is handled and use Harmony to add to it.

You're better off looking at a few mods that do that sort of thing, and seeing how they do it.