Page 1 of 1

Posted: Sun Nov 16, 2014 2:41 pm
by MagisterXF94
So
ive been trying to animate the hangar and it's animations which are present in the aristman Codex.
I went trough and created an animationxxx.bmp.mdl for each of the animation files present.
I also created a hangar.bmp.mdl file
the result is this garbled mess.


At first i thought it was a image resolution issue, so i scaled each image to the one used by the normal Allegiance GUI.
Same exact result.
All the other modifications i made using MDL THing 1.3.1 have not caused a problem.
Some other times allegiance does not load the hangar screen at all, causing a crash.
I cannot use MDLC to run convert commands because the application crashes.
Any ideas?

Posted: Sun Nov 16, 2014 2:51 pm
by Djole88
uhm... show the code for the mdls?

Posted: Sun Nov 16, 2014 2:59 pm
by MagisterXF94

Code: Select all

Hangar.bmp.mdl: use "model";
hangarbmp = ImportImageFromFile("hangar.bmp", false);
Animradar.bmp.mdl:use "model";
animradarbmp = ImportImageFromFile("animradar.bmp", true);

animloadoutbmp = ImportImageFromFile("animloadout.bmp", true);
animlaunchbmp = ImportImageFromFile("animlaunch.bmp", true);

Hangar.mdl:
use "gamepanes";
use "hangardata";
use "console";
use "font";

//
// Normal buttons
//

// format: FrameImageButtonPane(<animation>, <total time per loop>, <loop>, <run to last frame>);

launchButtonPane    = FrameImageButtonPane("animlaunch", .7, false, false);
commandButtonPane   = ButtonPane(ImportImage("animradarbmp", false), 5, false);
loadoutButtonPane   = ButtonPane(ImportImage("animloadoutbmp", false), 5, false);
investButtonPane    = ButtonPane(ImportImage("animinvestbmp", false), 5, false);
teleportButtonPane  = ButtonPane(ImportImage("animsectorbmp", false), 5, false);
teamButtonPane      = ButtonPane(ImportImage("animteambmp", false), 5, false);

helpButtonPane      = ButtonPane(ImportImage("btnquitbmp", false), 5, false);
exitButtonPane      = ButtonPane(ImportImage("btnexitgamebmp", false), 5, false);

//
// Info on the button the mouse is currently over
//

HoverTextColor = Color(0.75, 0.75, 0.75);
HoverTextSize = Point(600,24);
HoverTextFont = hugeFont;

hoverInfoPane = 
    SwitchPane(
        CurrentHover,
        [
            (
                StringPane("", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverNone
            ),
            (
                StringPane("Launch ship", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverLaunch
            ),
            (
                StringPane("Command screen", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverCommand
            ),
            (
                StringPane("Ship's loadout", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverLoadout
            ),
            (
                StringPane("Team investments", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverInvest
            ),
            (
                StringPane("Help", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverHelp
            ),
            (
                StringPane("Teleport to another station or Board another ship", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverTeleport
            ),
            (
                StringPane("Information about the teams playing", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverTeam
            ),
            (
                StringPane("Exit the game.", HoverTextColor, HoverTextSize, JustifyCenter, HoverTextFont), 
                hoverExit
            )

        ]
    );

InTurretPane =
    SwitchPane(
        BoardState,
        [
            (ImagePane(ImportImage ("hangarinturretbmp", false), []), 2)
        ]
    );


//
// The background and control positions
//

screen =
    ScreenPane(
        ImportImage("hangarbmp", false),
        [
            (launchButtonPane,       Point( 367, 162)),
            (commandButtonPane,      Point(  84, 283)),
            (loadoutButtonPane,      Point( 526, 247)),
            (investButtonPane,       Point( 530,  88)),
            (helpButtonPane,         Point( 208,  95)),
            (teleportButtonPane,     Point( 214, 248)),
            (teamButtonPane,         Point(  43, 102)),
            (exitButtonPane,         Point(  80,  515)),
            (hoverInfoPane,          Point( 100, 561)),
            (InTurretPane,             Point( 320, 450))
        ]
    );

Posted: Sun Nov 16, 2014 4:28 pm
by Djole88

Code: Select all

 Hangar.bmp.mdl: use "model";
hangarbmp = ImportImageFromFile("hangar.bmp", false);
Animradar.bmp.mdl:use "model";
animradarbmp = ImportImageFromFile("animradar.bmp", true);

animloadoutbmp = ImportImageFromFile("animloadout.bmp", true);
animlaunchbmp = ImportImageFromFile("animlaunch.bmp", true);
I know next to nothing about .mdl but seems to me that the code above doesn't create any panels? Is there anyone alive who knows stuff 'bout mdls? Also I'm not sure how mdl's processor memory space works (do variables get transferred from script to script, that is if you execute script 'x' do the vars persist for the scripts executed next?)

I could learn all that from the game code but don't have the time now.

there are some explanations in the "dialog.mdl" file so check and try to mimic some of the code?
Check in the beta artwork how cort implemented hangar.mdl

Posted: Sun Nov 16, 2014 4:39 pm
by MagisterXF94
I will.
Ive found this command which could potentially solve my problem.

Code: Select all

-compressanim
applies a form of RLE (Run Length Encoding) to an animation (presumably a .bmp with the frames stored side-by-side in rows and columns).
Sadly its only usable in MDLC which i cant get running at all......

Posted: Mon Nov 17, 2014 7:45 pm
by kaiser33
that all looks neat xD a new clicking game, your mission? (to load a prox and launch a scout xDD) challenge rating: ultra$#@!inghard xDDDDD