Jump to content

Recommended Posts

first of all thanks to everyone that keeps helping me in this forum.

second I apologize that I keep posting noob questions.

I did try googling and searching in this forum but no luck so I guess I have to post xD

 

back to the topic.

how do I add multiple modmain.lua? I tried renaming the other modmain but I am not sure what to do next cause its not showing in game. I tried adding it in the first modmain.lua

e.g:

PrefabFiles = {

"mod1",
"mod2",
}
and it works fine, but the problem is the item has no name so I need a separate .lua for it. what should I do next after renaming it?
 
Link to comment
https://forums.kleientertainment.com/forums/topic/59793-multiple-modmainlua-help/
Share on other sites

multiple modmain = multiple mods

if you just want to add few prefabs than make few lua files in prefab directory in mod

-mycoolmod----modmain.lua----prefab (directory)--------prefabname1.lua--------prefabname2.lua
look how other mods add prefabs (any character mod for example) and you are get idea how things works

You can use the function modimport("filename.lua") to import a file and have its code be treated as if it was a part of modmail.lua. Several mods do this. The only examples I know for sure are convenant of souls and essentially all my big mods (IR, Soulful Alchemy, Plushies).

You shouldn't write strings into modinfo.lua, since that file is only for the mod screen. Put it into modmain.lua or a unique file for strings using modimport().

 

As for the transform, why exactly do you want to make an invisible item larger? If you mean it should have a bigger animation, why don't you change the spriter project? If you're using an existing animation, SetScale() should work just fine for on-ground appearance. POst your code if you can't figure it out.

I did change the sprite, its  extra large now. but in game still not the size I want. I did tried enlarging it in the spriter too but it seems like it has a limit.

 

I added the code like this in the onequip:

 

    local function OnEquip(inst, owner) 
        --owner.AnimState:OverrideSymbol("swap_object", "swap_wands", "purplestaff")
        owner.AnimState:OverrideSymbol("swap_object", "swap_wand", "wand")
        owner.AnimState:Show("ARM_carry") 
        owner.AnimState:Hide("ARM_normal")
 
inst.Transform:SetScale(5,5,5)
 
 
but somehow it only rescaled the on ground image like you said.
 
screenshots.
 
 
 
as you can see, he is holding it on the very tip of the item which is not good. I tried repositioning the sprite but it does not do anything.
ps, i am not sure how to add a name for the item, when i hover over it it says missing name.
 
 

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