The Script Buttons

Discussion in 'Fallout General Modding' started by Helios, Feb 18, 2009.

  1. Helios

    Helios First time out of the vault

    41
    Apr 2, 2003
    I have in the past already posted, but without replys. So here's a bit more detailed:


    Fixit Button pressed:


    Button released with open Fixit:


    Second Button pressed:


    Fixit Button in combat pressed:


    Fixit Button in combat released:


    And back out of combat:




    Here is a little Version for the english game: http://uploaded.to/?id=0d78ho


    The Button have a little .ini File:
    Code:
    [Key]
    HotKey=33	;Hotkey to open Mr.Fixit (f) 
    
    [Msg]
    Number=1304	;Script Number for the .msg File
    And the .msg File:
    Code:
    #Configuration File for Button
    
    {1}{}{550}                                #Position X (Pixel)
    {2}{}{386}                                #Position Y (Pixel)
    {3}{}{41}                                 #Button X Size (Pixel)
    {4}{}{19}                                 #Button Y Size (Pixel)
    {5}{}{butin4}                             #Soundfile for Buttonpress
    {6}{}{butout4}                            #Soundfile for Buttonrelease
    {7}{}{PCX/mfdown.pcx}                     #Button down Image
    {8}{}{PCX/mfup.pcx}                       #Button up Image
    {9}{}{scripts/test0.int}	               #Button call Script
    {10}{}{Mr.Fixit not available in combat!} #Combat Window Message 
     
  2. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    I want to use Helios' button scripts in SD2 for MrFixit. It is pretty cool to add new buttons to the interface and affect the other stuff. Also with this it isn't very hard to add buttons into the game.

    A great thing, in my opinion- and also not hardcodet...
     
  3. Helios

    Helios First time out of the vault

    41
    Apr 2, 2003
    Thank you Lexx :)


    Yes, this is correct. You can add buttons at interface, pipboy, worldmap ect. ;)
     
  4. Mr.Wolna

    Mr.Wolna Vault Senior Citizen

    Nov 15, 2007
    and al this startet jsut with al little idea ;)

    yes really nice work. vcery user friendly.
     
  5. Jordan

    Jordan It Wandered In From the Wastes

    106
    May 8, 2008
    Helios

    Hi. You can provide the source code of scripts:

    glcombat.int
    glkeys.int
     
  6. Alchemist

    Alchemist Nocturnal Mechanic Modder

    164
    Dec 26, 2004
    2Helios:
    What about an options window, is it possible to add a script-driven button there? To have for example a 'Mod Config' in the same dialog with 'Save', 'Load', 'Exit'?
     
  7. Helios

    Helios First time out of the vault

    41
    Apr 2, 2003
    @Jordan
    I send you the Files. I hope this help you :)

    @Alchemist
    Yes it is possibel.





    Sorry, the images are not perfect, but I am not a good grafic artist.

    The main Problem is when you leave the game and start with a new char. Because all scripts stop and the variables were reset. But I have found a solution for this possibility, not perfect but it work.
     
  8. Ravager69

    Ravager69 Sonny, I Watched the Vault Bein' Built!

    Dec 21, 2007
    What is this mod precisly?
     
  9. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    You can add new buttons, change button functions, etc. In theory you can change the hole interface.
     
  10. Jesterka

    Jesterka Water Chip? Been There, Done That

    912
    Mar 16, 2006
    We (BGE) may be also interested. With blessing/credit of the author(s), of course.

    Helios?
     
  11. Grayswandir

    Grayswandir Mildly Dipped

    518
    May 9, 2008
    Is it already coupled with M.Fixit?
    I mean, do I just need to undat some files on my fallout directory or is it more complex?
     
  12. Alchemist

    Alchemist Nocturnal Mechanic Modder

    164
    Dec 26, 2004
    2Helios:
    I don't see a real problem here. The same thing happens with the game preferences. They are stored in the saved games and if we begin with a new char all values will be reset to defaults from the CFG.

    I think about the following idea.
    We start a new game with some mod.


    Then we open options menu with a new button inside.


    Either button being pressed spawns a script or one of the global scripts monitors the buttons state.


    Then scripts draws a dialog windows via for example "say mode" and stores modified values in some GVARS.


    That's enough. There is no real need to hack Fallout's script machine to make it run something before the actual start of a game session.

    P.S. My pictures actually are not screenshots but just photoshopped examples. :)
     
  13. Helios

    Helios First time out of the vault

    41
    Apr 2, 2003
    @Jesterka
    Yes that would be glad if the BGE would use my script button. You need only the fixit button or more?

    @Grayswandir
    Yes in my first post is a link to a little pack. You must copy the files into you F2 directory. Mr.Fixit is included.

    @Alchemist
    Yes, you're right. However, that's not really the problem. Imagine you start a new char and decide that you don't want to have the char this way for whatever reason, you go back to main menu and at the point where you press "yes" to the quit dialog all scripts are stopped and the variables reset. This actually results in that the button can be seen on the map when you enter it again, not the menu, but just the new button. I fixed the problem yesterday, but this is really just a quick&dirty method. It works this way: I'm looking into how much windows are open, if there are more open than should be at gamestart, the button window gets deleted. So the player nerver see that problem.
     
  14. Alchemist

    Alchemist Nocturnal Mechanic Modder

    164
    Dec 26, 2004
    Damn. Now I understand. You are not hacking into the code which processes the Options dialog but just adding an extra window, attached to the original one visually only.
    Well, that's not exactly what I meant. And much dirtier than I thought... Anyway, if there are no better variants this could work.

    And if we could make Sfall to support writing to the custom ini parameters, it would be even possible to share changed by user settings as a default for the new games.
     
  15. Helios

    Helios First time out of the vault

    41
    Apr 2, 2003
    Yes, I read the engine and use my new offset values for it. It is possible to change the engine but unnecessary.

    While there are still other possibilities, but from my perspective, it is the simplest and most effective way to do.

    If I have more time I will try out.