Jump to content

Calling all code monkeys. HAVE BANANA. Will bash.


Basha

Recommended Posts

Hi hi.  Long time listener, first time caller.

 

Let me just start by saying... I'm coming up on 15,000 zombies bashed.  Probably about 5k in March Ridge alone.  

 

So automatically im in some club where we get extra bashing privliges or something.  

 

#ohyoufancy

 

So I've been hijacking other people's mods to teach myself LUA.  So far I don't understand what the hell im writing, but I know when I write it... stuff happens.

 

I'm basically a genius. 

 

Minus the whole depressive angst or whatever.

 

I've scoured almost every single 'script' and 'lua' file in the media folder but I can't find what I'm looking for.  Found just about EVERYTHING else to do with my query... and yet what I really want eludes me.

 

Im looking for the place in the code where 'items' are defined and given a sprite as well as a 'form' container, wall mounted sign (chalkboard etc,) 

 

There's the item 'script' list but not every item is defined or assigned a sprite.

 

There's tons of lua files that give you recipes for contextual menus ie. barricading, making a spiked bat, there's also action recipes... as in, what happens when you hit 'climb through window'

 

I have pulled apart the texture packs and found the sprites I want to use... but what I can't find is how to tell the game that instead of using the plank sprites when I barricade a window... I want it to use the Spiffos sign sprite instead of boards.  Or say I want to be able to add my own artwork sprites to the game... where would I find the code that lets you turn that artwork into a two piece dismantalable wall mounted sign. As opposed to painting it directly on a wall.

 

im specifically looking for the sheet rope definition.  I found the lua file 'ISAddSheetRope' or whatever and I can see how it is assigned as a timed action and I'm adding stuff based on inventory to complete a final product that will then allow me to do certain stuff.  

 

Ive found other tidbits that describe how that contextual menu will pop so you you can't add it to ground level windows or similar shenanigans...

 

so im assuming that somewhere in the code there is a place that says 'Base.SheetRope use this sprite if these requirements are met and allow the player to climb between levels.

 

It would also be helpful to know where I can find the place in the code where the game says 'THIS IS A CHALKBOARD.  THESE ARE ITS FOUR SPRITES AND WHEN YOU ARE NEAR IT YOU CAN TAKE IT OFF THE WALL AND WILL BECOME TWO TRANSPORTABLE PIECES THAT WIEGH THIS MUCH AND SMELL LIKE NAPALM'

 

Im sure it's somewhere simple... like how I found out how the ENTIRE REST OF THE GAME WORKS FFS.  Just kidding it might as well be magic.  I'm pretty handy at editing parameters and tracking shit down but like holy fark.  

 

I really hope this info info is not in the java bits of everything.  Because holy F.  If you thought I was a super genius at lua... when you see me drool in blank nothing at a screenful of java, you will 1000% make me put my hockey helmet back on before I decide to headbutt that wall again.  

 

Oh fuck yeah buds.

totally for sure eh.

TIA=)

 

but no srsly... HALP.

 

 

Link to comment
Share on other sites

On 2018-04-16 at 8:40 PM, trombonaught said:

 I can contribute nothing to your plight but I thoroughly enjoyed this read. Best of luck.

Haha sweet thanks man.  Much appreciated taking the time to do so.  I am to put it ever so mildly... extremely long winded.

 

Fear not though! The second person who GAVE ME SOME F'ING PIE, (I love that BTW) also gave me an idea because his avatar made me think of another avatar I saw recently in a thread about item definitions within the code.

 

Some kind soul posted a tiny piece of code that overrides an old item and replaces it with a new one... 

 

So if I can find the base definition for ANY item that uses 4 sprites for 4 sides.... I can then use that basic format to create my own item with my desired sprites and then merely by dropping an replacement item in the script which is like no code at all, 10-15 words and no weird symbols or machine language.  

 

I can then simply implement my own stuff over top of the vanilla stuff without ever needing to see actual code of the vanilla stuff because the item is at the core of that code and if the item changes then it follows that the code will simply integrate my new item into the old 'build chain' thus creating a new HOORAY FOR EVERYTHING.

 

Of course i'lol probably need to compute for quantum time dilation in case I forget a frakking comma somewhere and cause the entire game to create the first perpetual motion device as it eats itself alive.

 

Soooooo yeah.  THANKS GUYS.

 

i swear this doesn't happen to me like a billions times a day. 

Link to comment
Share on other sites

In the item scripts, the Sprite is actually the icon for the inventory.

 

I skimmed your post pretty quickly, but what I think you're looking for is the map editing tools. Shit like wall lockers and everything else in the world is edited through those tools. The item's name, collision box, alternate angles, all that shit is done through map editing. Fire animation is implemented through these tools too, but I haven't figured out how to do a custom animation with them. I believe the tiles can stack 8 times.

 

TIS hasn't been very thorough in the past with how to use the tools, but there have been plenty of forum members helping out. The one issue that I don't know if it ever was resolved, was implementing both shit res, and 2x res tiles (all items are considered tiles). Been a while since I've fucked around with that, so it might have been answered/solved.

 

Go to this thread for what you're looking for.

 

Again, it used to be a pretty steep learning curve, but if you have the time you should be able to figure it out.

 

BTW, I learned LUA the same way.

Link to comment
Share on other sites

On 2018-04-17 at 9:32 PM, tommysticks said:

In the item scripts, the Sprite is actually the icon for the inventory.

 

I skimmed your post pretty quickly, but what I think you're looking for is the map editing tools. Shit like wall lockers and everything else in the world is edited through those tools. The item's name, collision box, alternate angles, all that shit is done through map editing. Fire animation is implemented through these tools too, but I haven't figured out how to do a custom animation with them. I believe the tiles can stack 8 times.

 

TIS hasn't been very thorough in the past with how to use the tools, but there have been plenty of forum members helping out. The one issue that I don't know if it ever was resolved, was implementing both shit res, and 2x res tiles (all items are considered tiles). Been a while since I've fucked around with that, so it might have been answered/solved.

 

Go to this thread for what you're looking for.

 

Again, it used to be a pretty steep learning curve, but if you have the time you should be able to figure it out.

 

BTW, I learned LUA the same way.

Oh hey dude.  Love your weapons mod.  Was shocked that they didn't already have a bow or crossbow in the game.  It's one of the biggest states for bow hunting.  I hadn't used any ranged weapon at all until I had roamed from WP to Muldraugh and was pushing on to March Ridge.  There were just so many Zeds I could only clear about 50m square before I got winded and had to run back to the guard house to rest.  Your mod was critical to securing the school for my main base in the game.  Would have taken weeks otherwise.  

 

Ya had the same thought with the map editing stuff.  Specifically the spawn objects utility as they add the ability to place sheet ropes.  Lol between java, lua and the map editing this is turning into quite the code adventure.  Just loaded javaguid or something to help me look for stuff there as well.  Seems similar to lua so I guess it's not as bad as when I first started looking to make a simple program lol

 

thanks a lot for the advice.  Super helpful tips, I know the spray paint mod you're talking about so should be easy to find.  I'm using the one adapted by blind coder now.  Will deffo have a look through that thread as well.  

 

Man it all started with the More Build mod... and now I spend far too long staring at gobbledygook on my screen.  

 

Gives me great hope though=D

 

your animation for sneaking with a drawn bow is what the sneaking action should always look like.  The weird river dance when moving at a certain angle holding an axe is a bit much sometimes lol

 

thanks again my dude.  =)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...