Need Help with simple Morph Issue

Need Help with simple Morph Issue

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Voidranaut
Posts: 47
Joined: 20 Dec 2009, 21:16

Need Help with simple Morph Issue

Post by Voidranaut »

**before I beging you should know I am new to modding spring and so I am sure I am making some simple mistake**

I am currently attempting to take the morphing code from XTA V:9.58 and place it in BA V:7.04

as far as i can tell the morph progam works with two parts

1) LuaRules\Gadgets\unit_morph.lua

2)LuaRules\Configs\morph_defs.lua


so far I am at a point were no errors are reported so the scirping runs BUT no upgrade buttons show for the units I designated as being able to upgrade (by changing the morph_defs.lua file)

when I moved the first file into BA there was an error on line 971 and I was able to fix that with the info on this forum (thanks guys this forum rocks :-) )

but as I attempt to add the 2nd file to BA I get issues and I think this is were my central issue is...

7-zip would not allow my to directly copy past the files from XTA to BA(I dont know why and I am sure the asnwer to that would help alot) so I thought I was being slick by bringing them to my descktop making the changes there and then pasting them into BA wich worked BUUTTTT... now that morph_defs.lua is in BA I cant change that version of the file (wich segjests something is wrong)... I can alter the Xta version to my hearts content but not the BA version... I asume that that means that in copying the file it messed up the path and that must be why no units in BA show the upgrade button because its trying to refrence stuff whos path is messed up (my hunch anyway)

at this point I hope I gave enough info in a clear way that makes it an easy fix... even if you dont have the asnwer I really appriciate you reading this thread... any info would be most helpfull... thank you
User avatar
maackey
Posts: 490
Joined: 02 Jul 2008, 07:11

Re: Need Help with simple Morph Issue

Post by maackey »

I'm not entirely certain what you're asking, but you can unzip the mod files into regular folders with an .sdd extension (ie. ba.sdd would be the name of the folder), which will work just like regular mods.

This way you can edit and change things in the files to your hearts content without having to worry about zipping and compressing everything.
Voidranaut
Posts: 47
Joined: 20 Dec 2009, 21:16

Re: Need Help with simple Morph Issue

Post by Voidranaut »

maackey wrote:I'm not entirely certain what you're asking, but you can unzip the mod files into regular folders with an .sdd extension (ie. ba.sdd would be the name of the folder), which will work just like regular mods.

This way you can edit and change things in the files to your hearts content without having to worry about zipping and compressing everything.

sorry for not being clear

thank you for the .sdd that helps alot

I do have one last probleam though... from a debugging point of veiw it would seem that the file unit_morph.lua is not properly refrencing the file morph_defs.lua

is there any way to make sure/doublcheck that the lua script is properly calling and refrencing the data stored in morph_defs.lua?

I am pretty sure that is my core issue at the moment

sorry if my question is regarding super simple lua componets I am still learning this language

thank you for your time
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Need Help with simple Morph Issue

Post by Beherith »

I dont know if this is what your looking for, but adding the following line of code will show you when its called, and show you a local variable.

Spring.Echo("This line of code is called, the variable value here is:" .. varx )
Voidranaut
Posts: 47
Joined: 20 Dec 2009, 21:16

Re: Need Help with simple Morph Issue

Post by Voidranaut »

thanks that helped

so for sure unit_morph is properly refrencing morph_defs

this means I am running out of ideas for why this is not properly operation...... as far as I can tell EVERYTHING is working (units gain health and experiance as code dictates) so ONLY the button is not showing...


it seems that this bit of code is what makes the button for the upgrade command

local morphCmdDesc = {
-- id = CMD_MORPH, -- added by the calling function because
--there is now more than one option
type = CMDTYPE.ICON,
name = 'Upgrade',
cursor = 'Morph', -- add with LuaUI?
action = 'morph',
}


I have been trying to find documentation on if that code printed above is universal in ALL Spring based mods or if its entriley unique to Xta for button creation

1) is that code above used for button generation universal to ALL mods?

2) how can I match that command to a keyboard key to double check?
I am having trouble finding the unikeys file that this site refrences

3) is it possible that the button is there but being placed under one of the earlyer buttons "move" "fight" "guard" ect. and I cant see it but its there?

thanks guys for takeing the time to answer my questions
Post Reply

Return to “Help & Bugs”