Jump to content

Recommended Posts

@509071_1452787209 Hey sorry about the delay I never got a notif :)...

Here a go he should swap between textures now

Luffy.zip

                  Size 

@509071_145278720 What would the items be specifically? 

Edited by SuperDavid
16 hours ago, SuperDavid said:

@509071_1452787209 Hey sorry about the delay I never got a notif :)...

Here a go he should swap between textures now

Luffy.zip

I'll start tagging you then :p 

@SuperDavid

Thanks alot! i'll save the spriting and detailed stats and all for later, hope you will still help me out by then!

Next up would be.. the 2 attacks. How do i take the effect of an item ingame and set is as just a keypress without the item?

One would be the huge summoned foot, the other would be the effect of the flute that puts surrounding enemies to sleep :) 

Edited by 509071_1452787209
24 minutes ago, 509071_1452787209 said:

'Old Bell' and 'Pan Flute'

Hmmm... That maybe too hard for me but I do remember a mod which calls a giant fist on enemies like how the old bell does.

I think it was a one piece mod too https://steamcommunity.com/sharedfiles/filedetails/?id=697540251 you should look through the code here in this mod & try to get the fist.

As for the pan flute sorry but I really wouldn't know how to do that Dx...

There are multiple one piece mods with that, so i thought it might be possible :p

But thats alright. i'll save it for later.

Would you be able to help me with the stats then when the character is transformed?

Or perhaps a ranged attack without having to equip a weapon?

A teleport bound to right click? (Seen this before)

An effect for when transformed? (Seen this before)

Starting item? (Seen this before)

Extra craftable for the character? (Seen this before)

There are alot of things i want to do xD

I just dont know what to do with the coding and where to put it :(

Maybe it'd be easier if you could like explain me a little on how i know what the code means,

and how i know where to put it, and what exactly i need to put there?

I dont know, i dont wanna bother you with all of this xD You've been helping out alot already..

If you dont want to anymore, i understand, thank you already!

15 hours ago, 509071_1452787209 said:

Starting item? (Seen this before)

In luffy.lua there will something like this which you can add item for example I added a spear to it.

you can replace spear with any item debugspawn name

local start_inv =
{
 "spear",
}

 

15 hours ago, 509071_1452787209 said:

Would you be able to help me with the stats then when the character is transformed?

Yes, I can.

15 hours ago, 509071_1452787209 said:

Extra craftable for the character? (Seen this before)

Do you mean he can craft like a spear without a science machine? For example add this to your modmain.lua

you can replace spear with any item debugspawn name

AddPrefabPostInit("luffy",
function(inst)
if(inst.components and inst.components.builder)
then
inst.components.builder:UnlockRecipe("spear")
end
end
)

I don't know what you mean by this? Can you tell me in more detail?

15 hours ago, 509071_1452787209 said:

An effect for when transformed? (Seen this before)

Download a mod which has that feature & look through the code because I wouldn't know how to do that, sorry...

15 hours ago, 509071_1452787209 said:

A teleport bound to right click? (Seen this before)

For range attack without weapon I wouldn't know either, sorry!

15 hours ago, 509071_1452787209 said:

Or perhaps a ranged attack without having to equip a weapon?

 

@SuperDavid

-Starting item, as in a costum hat. (So how can i create my own item/equippable, and make my character start off with it)

- Changing stats when transformed; What coding would i need to add to, for example make the hunger drop faster?

(Also, how could i make transformation 1 and 2 overlap? How would one go at this?)

-Effect for when transformed; For example, when pushing the transform button, an explosion happens where the character is standing.

-Also, how do i make my character bigger when transformed?

4 hours ago, 509071_1452787209 said:

Starting item, as in a costum hat. (So how can i create my own item/equippable, and make my character start off with it)

I never made a item before so I wouldn't know what to tell you, you should probably download a mod which also adds a hat & take the code..

4 hours ago, 509071_1452787209 said:

Changing stats when transformed; What coding would i need to add to, for example make the hunger drop faster?

You can change the numbers to anything you want for example 1.25 would be 25% higher than Wilson.

inst.components.hunger.hungerrate = 2 * TUNING.WILSON_HUNGER_RATE -- Default hunger is 1, this's double hunger of Wilson

inst.components.combat.damagemultiplier = 2 -- Default is 1, this's double attack of Wilson

inst.components.locomotor.runspeed = 2 * TUNING.WILSON_RUN_SPEED -- Default is 1, this's double speed of Wilson

inst.components.hunger.hurtrate = 1 -- Default is 1, how much damage u take from starving

inst.components.eater.strongstomach = true -- Can eat monstermeat no penalty

inst.components.eater.ignoresspoilage = true -- Ignores spoilage

inst.components.combat:SetDefaultDamage(10)  -- How much damage dealt with fists, default is 10

inst.components.sanity.neg_aura_mult = 0.75 -- How much sanity drain from monsters, default is 1

inst.components.sanity.night_drain_mult = 0.75 -- How much sanity drain from darkness, default is 1

inst.components.temperature.inherentinsulation = 100 -- How much insulation from cold, default is 0

inst.components.temperature.inherentsummerinsulation = 100 -- How much insulation from heat, default is 0

inst.DynamicShadow:SetSize(1.3, .6) -- How big is his shadow, default is (1.3, .6)

inst.Transform:SetScale(1, 1, 1) -- How big is he, default is (1, 1, 1)  btw I never used this so it might not work

If you want to add coding for when he transforms then put it in the TRANSFORM_? in modmain.lua where it says " -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE " you just add them there, don't forgot for them to have " act.target" instead of the usual "inst"

5 hours ago, 509071_1452787209 said:

(Also, how could i make transformation 1 and 2 overlap? How would one go at this?)

Replace the respective actions in your modmain.lua with this.

-- TRANSFORM_1
local TRANSFORM_1 = GLOBAL.Action()
TRANSFORM_1.str = "Transform_1"
TRANSFORM_1.id = "TRANSFORM_1"
TRANSFORM_1.fn = function(act)
if act.target.transform_1 == nil and act.target.transform_2 == nil and act.target.transform_3 == nil then -- Activates when Luffy transforms when not transformed
act.target.transform_1 = true -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE
act.target.AnimState:SetBuild("luffy_armament_haki")
act.target.components.talker:Say("This's my first form!")
elseif act.target.transform_1 == true and act.target.transform_2 == nil and act.target.transform_3 == nil then -- Activates when Luffy goes normal when transformed
act.target.transform_1 = nil -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE
act.target.AnimState:SetBuild("luffy")
act.target.components.talker:Say("I'm to the way I used to be!")
elseif act.target.transform_2 == true or act.target.transform_3 == true then  -- Activates when Luffy is in form 3 & can't enter
act.target.components.talker:Say("I'm already in form 1!")
elseif
act.target.transform_1 == nil and act.target.transform_2 == true and act.target.transform_3 == nil then  -- Activates when Luffy transforms when already in form 2
act.target.transform_1 = true -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE
act.target.AnimState:SetBuild("luffy_armament_haki")
act.target.components.talker:Say("I'm now in transfrom 1 & 2! Incredible!!")
elseif act.target.transform_1 == true and act.target.transform_2 == true and act.target.transform_3 == nil then -- Activates when Luffy just goes to form 2 from form 1
act.target.transform_1 = nil -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE
act.target.AnimState:SetBuild("luffy_gear_second")
act.target.components.talker:Say("I lost transform 1. I'm now just in transfrom 2!")
end
end
AddAction(TRANSFORM_1)

-- TRANSFORM_2
local TRANSFORM_2 = GLOBAL.Action()
TRANSFORM_2.str = "Transform_2"
TRANSFORM_2.id = "TRANSFORM_2"
TRANSFORM_2.fn = function(act)
if act.target.transform_1 == nil and act.target.transform_2 == nil and act.target.transform_3 == nil then -- Activates when Luffy transforms when not transformed
act.target.transform_2 = true -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE
act.target.AnimState:SetBuild("luffy_gear_second")
act.target.components.talker:Say("This's my 2nd form!")
elseif act.target.transform_1 == nil and act.target.transform_2 == true and act.target.transform_3 == nil then -- Activates when Luffy goes normal when transformed
act.target.transform_2 = nil -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE
act.target.AnimState:SetBuild("luffy")
act.target.components.talker:Say("I'm to the way I used to be!")
elseif act.target.transform_1 == true or act.target.transform_3 == true then -- Activates when Luffy is in form 3 & can't enter
act.target.components.talker:Say("I'm already in form 2!")
elseif
act.target.transform_1 == true and act.target.transform_2 == nil and act.target.transform_3 == nil then  -- Activates when Luffy transforms when already in form 1
act.target.transform_2 = true -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE
act.target.AnimState:SetBuild("luffy_gear_second")
act.target.components.talker:Say("I'm now in transfrom 2 & 1! Incredible!!")
elseif act.target.transform_1 == true and act.target.transform_2 == true and act.target.transform_3 == nil then -- Activates when Luffy just goes to form 1 from form 2
act.target.transform_1 = nil -- IF YOU WANT TO CHANGE ANY STATS WHEN HE TRANSFORMS PUT IT IN HERE
act.target.AnimState:SetBuild("luffy_armament_haki")
act.target.components.talker:Say("I lost transform 2. I'm now just in transfrom 1!")
end
end
AddAction(TRANSFORM_2)

 

5 hours ago, 509071_1452787209 said:

-Effect for when transformed; For example, when pushing the transform button, an explosion happens where the character is standing.

I don't know sorry.

I dont think the combination transform works??

I have tried making the character bigger when transformed, and it works! But how do i set it back when untransforming again? Same goes for speed and other stats.

Where do i put 

inst.components.eater.strongstomach = true

For when in any form?

Edited by 509071_1452787209
1 hour ago, 509071_1452787209 said:

I have no idea how to get rid of these freaking "said:" boxes, UGH! So, i'm gonna reply in this...

Here I fixed the problem a.zip! It only took me 1 hour of bashing my head against the wall to fix it!

In the modmain.lua it would show where that other stuff you asked would go.

Thanks alot, im sorry you have to put so much effort into something for someone else.. :S I really appreciate the effort!

So umm, its working now. But when i like combine them, is there a way to sortof fuse the way it looks?

example; when combined you have the arms of transformation 1, but the rest is transformation 2?

Or would it be easier to change the coding to yet another transform once combined?

What part of the coding nullifies the effect of transform again? Im using the scale increase on transform 3 but it doesnt change back :l

p.s. did you add the 

Quote

inst.components.eater.strongstomach = true

on the regular(base) form?? It needs to be like that in any mode. (Thats how it works right? If nothing is changed from base stats then it remains the same in other transforms?)

14 minutes ago, 509071_1452787209 said:

What part of the coding nullifies the effect of transform again? Im using the scale increase on transform 3 but it doesnt change back :l

I'm sorry I tried the size thing & it didn't work for me so unfortunately I don't know how to use it so I can't help with that...

15 minutes ago, 509071_1452787209 said:

inst.components.eater.strongstomach = true

Add that code in luffy.lua under master_postinit if you want him be able eat monstermeat all the time

16 minutes ago, 509071_1452787209 said:

is there a way to sortof fuse the way it looks?

You're going to have to make 1 new texture build which's when transform 1 & transform 2 is fused

About the size; would it be possible to 'reset' by setting the other forms back to 1,1,1 ?

32 minutes ago, SuperDavid said:

You're going to have to make 1 new texture build which's when transform 1 & transform 2 is fused

Done. Named it 'luffy_armament_haki_gear_second'.

 

modmain.lua

Replace your old modmain with this one.

31 minutes ago, 509071_1452787209 said:

About the size; would it be possible to 'reset' by setting the other forms back to 1,1,1 ?

Why don't you try it yourself & see?

29 minutes ago, SuperDavid said:

Why don't you try it yourself & see?

I was going to, but just asking, maybe you knew it would work :D

Btw;

Quote

local assets = {
    Asset( "ANIM", "anim/luffy_armament_haki.zip"),
    Asset( "ANIM", "anim/luffy_gear_second.zip"),
    Asset( "ANIM", "anim/luffy_gear_fourth.zip"),
    Asset( "ANIM", "anim/luffy_armament_haki_gear_second.zip")
    Asset("SCRIPT", "scripts/prefabs/player_common.lua"),
}
local prefabs = {}

Error; telling me line 10 '{' is expected to be '}' at line 5? near asset or something.

O wow lol, the tiniest details really matter..

Btw, i have fixed the issue of the size when transforming back. 

Was pretty simple actually, starting to learn haha :D 

-- TRANSFORM_3
local TRANSFORM_3 = GLOBAL.Action()
TRANSFORM_3.str = "Transform_3"
TRANSFORM_3.id = "TRANSFORM_3"
TRANSFORM_3.fn = function(act)
if act.target.transform_1 == nil and act.target.transform_2 == nil and act.target.transform_3 == nil then
act.target.transform_3 = true
act.target.AnimState:SetBuild("luffy_gear_fourth")
act.target.components.talker:Say("This's my 3rd form!")
act.target.Transform:SetScale(2, 2, 2)
elseif act.target.transform_1 == nil and act.target.transform_2 == nil and act.target.transform_3 == true then
act.target.transform_3 = nil
act.target.AnimState:SetBuild("luffy")
act.target.components.talker:Say("I'm to the way I used to be!")
act.target.Transform:SetScale(1, 1, 1)
elseif act.target.transform_1 == true or act.target.transform_2 == true then
act.target.components.talker:Say("I can't!")
end
end

Also, i have accidently taken the skin of the fused transform as basic skin.

And it wont change back again.. How do i fix this?

22 minutes ago, 509071_1452787209 said:

Also, i have accidently taken the skin of the fused transform as basic skin.

And it wont change back again.. How do i fix this?

Can you explain to me in more detail? Or you can just post the entire mod then I can fix it.

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...