Blockland Forums > Modification Help
Base addon code?
Pages: (1/1)
Brixmon:
I'm not talking about 'default' add-ons- like Weapon_Gun, Weapon_Rocket_Launcher, or Vehicle_Jeep. I mean items that are always loaded as part of the base game-
the wrench, hammer, wand, etc. Mostly, I need emitter/particle/image data, as having the default Wand/Destructo Wand's code would be helpful for making spellcasting wand variants.
But I've looked around, and the game files don't seem to have them in a readable .cs format. I don't precisely know what to search for, so I'm asking here again.
Oh, also, if it seems like I'm doing a lot of unrelated things, I am. I'm juggling a bunch of different server concepts to see what works and what people will play.
Platypi:
Why not just look at the datablocks of the base weapons/items? For instance, say I want to get the emitter data for the printer. First, I start my own singleplayer game or server. When I spawn, I have a printer in my 3rd inventory slot. To find the ItemData, I open the console and type
--- Code: ---==> echo(findclientbyname(<name>).player.tool[2]);
383
--- End code ---
This is the ID of the printer object. To verify that this is in fact the printer, I run
--- Code: ---==> echo(383.getName());
PrintGun
--- End code ---
To get the image file where the emitter data is listed, I run
--- Code: ---==> echo(PrintGun.image);
PrintGunImage
--- End code ---
Now I want to look through the array of states until I find the firing state.
--- Code: ---==> echo(PrintGunImage.stateName[0]);
Activate
--- End code ---
That's not it. I increment the array index until...
--- Code: ---==> echo(PrintGunImage.stateName[2]);
Fire
--- End code ---
I've found the state index I want. Now to get the corresponding emitter,
--- Code: ---==> echo(PrintGunImage.stateEmitter[2]);
printGunEmitter
--- End code ---
And there's the emitter I want. This whole process can be summarized as
--- Code: ---==> echo(findclientbyname(<name>).player.tool[2].image.stateEmitter[2]);
printGunEmitter
--- End code ---
Just equip the item you want to find the emitter for, and run through the same process. The only potential difference will be the index of the tool and state arrays.
Conan:
you are correct, they are not readable, as they are encrypted as DSO files found in base/. below i've packaged the files i have on the following items: hammer, wrench, printer, brick item, admin wand, and wand
https://cdn.discordapp.com/attachments/372648606383210508/375502338355363841/default_item_datablocks_and_functions.zip
Brixmon:
--- Quote from: Conan on November 02, 2017, 12:29:50 AM ---you are correct, they are not readable, as they are encrypted as DSO files found in base/. below i've packaged the files i have on the following items: hammer, wrench, printer, brick item, admin wand, and wand
https://cdn.discordapp.com/attachments/372648606383210508/375502338355363841/default_item_datablocks_and_functions.zip
--- End quote ---
Ah, thanks! This is just what I needed.
Pages: (1/1)