Jump to content

Recommended Posts

This is basically a character called Wilwhat that will start out on random health, hunger, sanity, damage, movement speed, sanity drain at night and sanctity drain when around things like evil flowers.
 

post-277413-0-00127200-1385624349.png

Mainly Wilwhat's stats are:


- Max health randomized between 75 - 300.
 
- Max hunger depends on how high or low you health is so it randomizes between:
100 - 150 or 150 - 300 or 100 - 200.
 
- Sanity is randomized between 100 - 300 .
- Sanity drain during the night is randomized between 0.5 - 2.
- Sanity drain around monsters, evil flowers and so on... is between 0.5 - 2.
 
- Damage is between 0.75 - 2.5 (measured in Wilsons).
 
- Run speed blah blah blah between 5 - 9.
- Walk speed equals run speed - 2 regardless.
 
He has no special abilities yet but i'm thinking on him having a random ability passed down from the other main characters.

 
I am sorta currently working on making an edible item that doesn't have any effects but will know him out cold and re-randomize his stats in case you get a bad start.  He will start with only one of this item and only he can craft it at an average quite a high cost of resources and it will redo ALL of the stats (like above) so you have a change to get an even worse build!

 

 For the new art I've used the HD Wilson mod as a template as the original art is just retextured wilson anyway.  So now I feel as if the art is more or less complete and I have made the save slot, big portrait and a mini map icon.  So I am soon to release the first working version of this mod soon.

 

*old art in the spoiler, as the new art is HD*

In terms of art I have an idea and put together a basic idea on what i'm looking for (its basicly a black and white re-textured Wilson with no hair...), but I am no artist and roughly put it together as I have no idea what i'm doing.  So i would need someone to completely redo the art...  

post-277413-0-52838000-1384635835.jpg

 

 

I am open to suggestions, but I am mostly working on another mod, this is more of a pass time project. 

 

 

So basicly what i'm working on:


- Making a stat randomizing item. *Not too sure about how to do this yet.

 

- Random abilities for Wilwhat. *I have an idea on how i'm going to do this.

 

- Finding someone for art of only the character animations. *I hired myself, the pay wasn't that good but I still did it.   :grin:


 
This is currently a side project as i'm mainly working on this but it is still mainly to learn and improve. (in scripting/coding) Edited by MySpoon

You know, instead of making your own art you could (possibly randomly) patch together parts from several characters.

HGzJ2qc.png

 

Yea, I would have to agree with Xjurwi on that, it is quite terrifying.  

 

But back on topic,  I have tried to do that with not so good results, I even tried to complete the skin for Wilwhat all by my self buuuuuttt...  I just can't seem to align everything up right not matter how many times I re adjust everything it always results in just and horribly overlapped animation.  And this is just a retexture version of wilson! BUT I do have my unaligned textere and maybe if someone could just properly align and just sorta "freshen it up" it for me that that would work also.

If you are on Windows I suggest you downlaod the Wilson HD mod because it contains Spriter assets to be able to directly see the alignment without converting to the game files. Plus the files get converted automatically. Plus it's HD ; )

On that note simplex, Cheerio how is the porting going so far? I saw that you wanted to implement ktech into the thing instead of using Kleis converter, is that working out? I don't mean to push you, just curious.

Edit: Damnit, mentions don't work... I'll just hope you find your way here anyways...

Edited by Malacath

On that note simplex, Cheerio how is the porting going so far? I saw that you wanted to implement ktech into the thing instead of using Kleis converter, is that working out? I don't mean to push you, just curious.

Edit: Damnit, mentions don't work... I'll just hope you find your way here anyways...

I haven't heard back from Cheerio about adding ktech to the tools yet.

Then let's just be patient  ^^

 

Btw, do you know what these icons to the left mean?

I think we should carry this discussion elsewhere...

But are you talking about the modder badges?

Edited by simplex

I think we should carry this discussion elsewhere...

But are you talking about the modder badges?

You're right, sorry...

 

So On-Topic, somthing I thought about yesterday and forgot to post:

I would refrain from creating an item that randomizes your stats because it will lead to a lot of scumming until you get stats you like. That's what shoots in my mind at least... but then again the same problem probably occurs when having random stats on new games...

I would refrain from creating an item that randomizes your stats because it will lead to a lot of scumming until you get stats you like. That's what shoots in my mind at least... but then again the same problem probably occurs when having random stats on new games...

Well, he could implement a craftable (with a high-ish cost) single use "reroll die" that saves the game upon use.

Expanding on this idea, there could be higher tier dice which on average give a higher value for one stat, but lower ones for the rest.

(nothing to see here, thetruthseeker...)

Edited by simplex

I would refrain from creating an item that randomizes your stats because it will lead to a lot of scumming until you get stats you like. That's what shoots in my mind at least... but then again the same problem probably occurs when having random stats on new games...

 

Well, this item would be a one use item, until you were to craft another, but it is up to  what the player would do, if they make this item and use it, chances are they will want to re-random until they get a decent selection, but this will take a lot of time and effort depending on what your stats happen to be.  

 

But what I could do is make everything random depending on what the other stats are like what i've done with hunger. If you have a lower stat then you'll have a chance to get better or if a higher stat, it wouldnt change too much. but then this would also cause people to use this item over and over again, so really It is up to the player and what they think is a good combo.

 

 

Well, he could implement a craftable (with a high-ish cost) single use "reroll dice" that saves the game upon use.

Expanding on this idea, there could be higher tier dices which on average give a higher value for one stat, but lower ones for the rest.

 

This is not a bad idea as well, i might use this or something similar, well when I decide to further develop this mod.

I guess this is a bump..?  But anyway I have run into quite an annoying problem.  As my characters stats are randomed, the way i've written out the code means that when you save and exit while playing as Wilwhat and go back onto the save, your stats will re-random.  I believe I need to used something along the lines of "onsave" & "onload" but I've got no clue on how to do anything like this. (still a scripting noob.)
 
Anyway, code for Wilwhat below.

 local MakePlayerCharacter = require "prefabs/player_common"  local assets ={          Asset( "ANIM", "anim/player_basic.zip" ),        Asset( "ANIM", "anim/player_idles_shiver.zip" ),        Asset( "ANIM", "anim/player_actions.zip" ),        Asset( "ANIM", "anim/player_actions_axe.zip" ),        Asset( "ANIM", "anim/player_actions_pickaxe.zip" ),        Asset( "ANIM", "anim/player_actions_shovel.zip" ),        Asset( "ANIM", "anim/player_actions_blowdart.zip" ),        Asset( "ANIM", "anim/player_actions_eat.zip" ),        Asset( "ANIM", "anim/player_actions_item.zip" ),        Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ),        Asset( "ANIM", "anim/player_actions_bugnet.zip" ),        Asset( "ANIM", "anim/player_actions_fishing.zip" ),        Asset( "ANIM", "anim/player_actions_boomerang.zip" ),        Asset( "ANIM", "anim/player_bush_hat.zip" ),        Asset( "ANIM", "anim/player_attacks.zip" ),        Asset( "ANIM", "anim/player_idles.zip" ),        Asset( "ANIM", "anim/player_rebirth.zip" ),        Asset( "ANIM", "anim/player_jump.zip" ),        Asset( "ANIM", "anim/player_amulet_resurrect.zip" ),        Asset( "ANIM", "anim/player_teleport.zip" ),        Asset( "ANIM", "anim/wilson_fx.zip" ),        Asset( "ANIM", "anim/player_one_man_band.zip" ),        Asset( "ANIM", "anim/shadow_hands.zip" ),        Asset( "SOUND", "sound/sfx.fsb" ),        Asset( "SOUND", "sound/wilson.fsb" ),        Asset( "ANIM", "anim/beard.zip" ),                  Asset( "ANIM", "anim/wilwhat.zip" ),  }  local prefabs = {}  local start_inv ={"",}   local fn = function(inst)          inst.soundname = "wilson"    inst.MiniMapEntity:SetIcon("wilwhat.tex")          inst.components.health.maxhealth = math.random(75,300)inst.components.health.currenthealth = inst.components.health.maxhealth if inst.components.health.currenthealth >= 200 theninst.components.hunger:SetMax(math.random(100,150))elseif inst.components.health.currenthealth <= 100 theninst.components.hunger:SetMax(math.random(150,300))elseinst.components.hunger:SetMax(math.random(100,200))end inst.components.sanity.max = math.random(100,300)inst.components.sanity.night_drain_mult = math.random(0.5,2)    inst.components.sanity.neg_aura_mult = math.random(0.5,2) inst.components.combat.damagemultiplier = math.random(0.75,2.5)     inst.components.locomotor.runspeed = math.random(5,9)    inst.components.locomotor.walkspeed = (inst.components.locomotor.runspeed -2)           end  STRINGS.CHARACTER_TITLES.wilwhat = "Wilwhat?"STRINGS.CHARACTER_NAMES.wilwhat = "Wilwhat"STRINGS.CHARACTER_DESCRIPTIONS.wilwhat = "*Horribly textured \n*Stats are randomised! You either get a \n really good or bad or a balenced pick."STRINGS.CHARACTER_QUOTES.wilwhat = "\"RANDOM, RANDOM EVERYTHING!\"" --STRINGS.CHARACTERS.WILWHAT = require "wilwhat_speech" return MakePlayerCharacter("wilwhat", prefabs, assets, fn)

Edited by MySpoon

You simply add two local functions OnLoad and OnSave which take the arguments inst and data in that order.

In the OnSave function you save everything you want to save inside the data table (I.e. data.maxsanity = maxsanity) and return data.

In OnLoad you disect the data table returned by OnSave at the last save and modiy your entity accordingly (I.e. set maxsanity = data.maxsanity)

Finally you set the OnSave and OnLoad functions for your entity in your local fn with

Inst.OnSave = OnSave

Inst.OnLoad = OnLoad

I think you can find a lot of examples, evergeens would be one.

You simply add two local functions OnLoad and OnSave which take the arguments inst and data in that order.

In the OnSave function you save everything you want to save inside the data table (I.e. data.maxsanity = maxsanity) and return data.

In OnLoad you disect the data table returned by OnSave at the last save and modiy your entity accordingly (I.e. set maxsanity = data.maxsanity)

Finally you set the OnSave and OnLoad functions for your entity in your local fn with

Inst.OnSave = OnSave

Inst.OnLoad = OnLoad

I think you can find a lot of examples, evergeens would be one.

 

Ahhhhh i see now, it's a lot more simpler than I thought.  Thanks!

This mod is very,awww,so original though i like because it contains a lot of work in itself. :-)

 

Thanks, though it's not meant to be an 'out there' amazing mod, just more of a pass time project for learning how to code/script as I am still very new to everything.

Thanks, though it's not meant to be an 'out there' amazing mod, just more of a pass time project for learning how to code/script as I am still very new to everything.

Thanks, though it's not meant to be an 'out there' amazing mod, just more of a pass time project for learning how to code/script as I am still very new to everything.

That is fine. :)

You simply add two local functions OnLoad and OnSave which take the arguments inst and data in that order.

In the OnSave function you save everything you want to save inside the data table (I.e. data.maxsanity = maxsanity) and return data.

In OnLoad you disect the data table returned by OnSave at the last save and modiy your entity accordingly (I.e. set maxsanity = data.maxsanity)

Finally you set the OnSave and OnLoad functions for your entity in your local fn with

Inst.OnSave = OnSave

Inst.OnLoad = OnLoad

I think you can find a lot of examples, evergeens would be one.

*BTW* Ive been away due to other commitments and such... but anyway.

 

I know I said it was simpler than I thought, but when I did this it worked the first time when I quit the game and went back into it, but when I did it again my stats re-randomized the second time I quit and returned.

My code here:

local MakePlayerCharacter = require "prefabs/player_common"  local assets ={          Asset( "ANIM", "anim/player_basic.zip" ),        Asset( "ANIM", "anim/player_idles_shiver.zip" ),        Asset( "ANIM", "anim/player_actions.zip" ),        Asset( "ANIM", "anim/player_actions_axe.zip" ),        Asset( "ANIM", "anim/player_actions_pickaxe.zip" ),        Asset( "ANIM", "anim/player_actions_shovel.zip" ),        Asset( "ANIM", "anim/player_actions_blowdart.zip" ),        Asset( "ANIM", "anim/player_actions_eat.zip" ),        Asset( "ANIM", "anim/player_actions_item.zip" ),        Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ),        Asset( "ANIM", "anim/player_actions_bugnet.zip" ),        Asset( "ANIM", "anim/player_actions_fishing.zip" ),        Asset( "ANIM", "anim/player_actions_boomerang.zip" ),        Asset( "ANIM", "anim/player_bush_hat.zip" ),        Asset( "ANIM", "anim/player_attacks.zip" ),        Asset( "ANIM", "anim/player_idles.zip" ),        Asset( "ANIM", "anim/player_rebirth.zip" ),        Asset( "ANIM", "anim/player_jump.zip" ),        Asset( "ANIM", "anim/player_amulet_resurrect.zip" ),        Asset( "ANIM", "anim/player_teleport.zip" ),        Asset( "ANIM", "anim/wilson_fx.zip" ),        Asset( "ANIM", "anim/player_one_man_band.zip" ),        Asset( "ANIM", "anim/shadow_hands.zip" ),        Asset( "SOUND", "sound/sfx.fsb" ),        Asset( "SOUND", "sound/wilson.fsb" ),        Asset( "ANIM", "anim/beard.zip" ),                  Asset( "ANIM", "anim/wilwhat.zip" ),  }  local prefabs = {}local function OnSave(inst, data)	data.maxhealth = inst.maxhealth	data.maxhunger = inst.maxhunger		data.maxsanity = inst.maxsanity	data.night_drain_mult = inst.night_drain_mult	data.neg_aura_mult = inst.neg_aura_mult		data.damagemultiplier = inst.damagemultiplier		data.runspeed = inst.runspeed	data.walkspeed = inst.walkspeed		return dataendlocal function OnLoad(inst, data)	inst.maxhealth = data.maxhealth	inst.maxhunger = data.maxhunger		inst.maxsanity = data.maxsanity	inst.night_drain_mult = data.night_drain_mult	inst.neg_aura_mult = data.neg_aura_mult		inst.damagemultiplier = data.damagemultiplier		inst.runspeed = data.runspeed	inst.walkspeed = data.walkspeedend	local start_inv ={	"",}  local fn = function(inst)          inst.soundname = "wilson"    inst.MiniMapEntity:SetIcon("wilwhat.tex")          inst.components.health.maxhealth = math.random(75,300)	inst.components.health.currenthealth = inst.components.health.maxhealth		if inst.components.health.currenthealth >= 200 then		inst.components.hunger:SetMax(math.random(100,125))	elseif inst.components.health.currenthealth <= 100 then		inst.components.hunger:SetMax(math.random(200,250))	else		inst.components.hunger:SetMax(math.random(100,200))	end		inst.components.sanity.max = math.random(100,300)	inst.components.sanity.night_drain_mult = math.random(0.5,2)    inst.components.sanity.neg_aura_mult = math.random(0.5,2)		inst.components.combat.damagemultiplier = math.random(0.75,2.5)	    inst.components.locomotor.runspeed = math.random(5,9)    inst.components.locomotor.walkspeed = (inst.components.locomotor.runspeed -2)      	    	inst.OnSave = OnSave	inst.OnLoad = OnLoad	end	STRINGS.CHARACTER_TITLES.wilwhat = "Wilwhat?"STRINGS.CHARACTER_NAMES.wilwhat = "Wilwhat"STRINGS.CHARACTER_DESCRIPTIONS.wilwhat = "*Stats are randomised! You either get a \n really good or bad or a balanced pick."STRINGS.CHARACTER_QUOTES.wilwhat = "\"What is there to a game if there are no surprises...\""--STRINGS.CHARACTERS.WILWHAT = require "wilwhat_speech"	return MakePlayerCharacter("wilwhat", prefabs, assets, fn)

I don't know for sure but I guess that, since the code inside of fn(inst) is run every time the game loads you'll randomize your stats that way and I think that code runs before OnLoad. So my first attempt at fixing it would be to add a zero-time delay into the OnLoad function. Meaning you do

inst:DoTaskInTime(0, function()    --Code hereend)

No promises though  ; )

I don't know for sure but I guess that, since the code inside of fn(inst) is run every time the game loads you'll randomize your stats that way and I think that code runs before OnLoad. So my first attempt at fixing it would be to add a zero-time delay into the OnLoad function. Meaning you do

inst:DoTaskInTime(0, function()    --Code hereend)
No promises though  ; )

 

Ok, so I had just done that and tested it out. What happens now is that all the starting stats for hunger, health and sanity = 150,150,200 by default and may randomly change after a second *also changes every other stat as well.*. Unfortunately this happens also when you quit then load the game as well...

Ok, so I had just done that and tested it out. What happens now is that all the starting stats for hunger, health and sanity = 150,150,200 by default and may randomly change after a second *also changes every other stat as well.*. Unfortunately this happens also when you quit then load the game as well...

No clue right now what could be the cause. Could you maybe share your mod again, I'd take a look later.

You know, instead of making your own art you could (possibly randomly) patch together parts from several characters.

HGzJ2qc.png

hey-HEY IS THAT MY EYE? that's why i don't usually visit modding part of forums...

kind of a nice idea, though, may be quite interesting! especially if you start up super overpowered or super weak... XD

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...