Recent Posts

Pages: [1] 2 3 ... 10
1
Questions and Answers / Re: Audio lines
« Last post by KingR on Today at 11:14:02 am »
The solution : for the audio of the dialogues, I used PlayMusic instead of PlaySound :

void r_PlayMarcus(Critter& player, Critter@ npc, int val)
{
    // passing value for dialog
    if(val == 1)
        PlayMusic(player, "MCS1A.wav", 0, 0);
    else if(val == 2)
        PlayMusic(player, "MCS1B.wav", 0, 0);
    else if(val == 3)
        PlayMusic(player, "MCS1C.wav", 0, 0);
      
   
This temporarily stops the music in that area, but I restart it at the end of the dialogue  ;D
2
Questions and Answers / Re: Center the screen on the character script
« Last post by KingR on Today at 01:42:31 am »
Hi everyone! I managed to center the screen on the player when the dialog box appears:

In client_interface.fos, i added this :

void CenterPlayerOnScreenDialog() // Le téléport, marche
{
    CritterCl@ player = GetChosen();
    if (valid(player)) {
        RunServerScriptUnsafe("dev_menu@unsafe_TeleportPlayer", 0, player.HexX, player.HexY, null, null);
    }
}

And changed this :

void screen_change(bool show, int screen, int p0, int p1, int p2)
{
    if(show && screen == CLIENT_SCREEN_DIALOG) //Here
    {
        CenterPlayerOnScreenDialog();
    }

    if(DialogImage.Exists() && recheckDialogImage &&
       show && screen != CLIENT_SCREEN_DIALOG &&
       !(screen == CLIENT_SCREEN_BARTER || screen == CLIENT_SCREEN_SAY))
    {
        DialogImage.Unset();
        recheckDialogImage = false;
    }

    if(!show && DialogImage.Exists() && screen == CLIENT_SCREEN_DIALOG)
    {
        recheckDialogImage = true;
    }

    if(show)
        GUI_ShowScreen(screen, p0, p1, p2);
    else
        GUI_HideScreen(screen, p0, p1, p2);
}

And in dev_menu.fos :

void unsafe_TeleportPlayer(Critter& player, int dummy, int x, int y, string@ param3, array<int>@ param4)
{
    Map@ map = player.GetMap();
    if (valid(map)) {
        uint16 hexX = player.HexX;
        uint16 hexY = player.HexY;
        player.TransitToHex(hexX + 1, hexY, 0xff); // Téléporte le joueur sur une case voisine
        player.TransitToHex(hexX, hexY, 0xff); // Téléporte le joueur sur sa case d'origine
    }
}

It's really not clean, but it works!  ;D
3
Questions and Answers / Re: Dialog
« Last post by KingR on Today at 01:20:40 am »
Hi everyone! I managed to center the screen on the player when the dialog box appears:

In client_interface.fos, i added this :

void CenterPlayerOnScreenDialog() // Le téléport, marche
{
    CritterCl@ player = GetChosen();
    if (valid(player)) {
        RunServerScriptUnsafe("dev_menu@unsafe_TeleportPlayer", 0, player.HexX, player.HexY, null, null);
    }
}

And changed this :

void screen_change(bool show, int screen, int p0, int p1, int p2)
{
    if(show && screen == CLIENT_SCREEN_DIALOG) //Here
    {
        CenterPlayerOnScreenDialog();
    }

    if(DialogImage.Exists() && recheckDialogImage &&
       show && screen != CLIENT_SCREEN_DIALOG &&
       !(screen == CLIENT_SCREEN_BARTER || screen == CLIENT_SCREEN_SAY))
    {
        DialogImage.Unset();
        recheckDialogImage = false;
    }

    if(!show && DialogImage.Exists() && screen == CLIENT_SCREEN_DIALOG)
    {
        recheckDialogImage = true;
    }

    if(show)
        GUI_ShowScreen(screen, p0, p1, p2);
    else
        GUI_HideScreen(screen, p0, p1, p2);
}

And in dev_menu.fos :

void unsafe_TeleportPlayer(Critter& player, int dummy, int x, int y, string@ param3, array<int>@ param4)
{
    Map@ map = player.GetMap();
    if (valid(map)) {
        uint16 hexX = player.HexX;
        uint16 hexY = player.HexY;
        player.TransitToHex(hexX + 1, hexY, 0xff); // Téléporte le joueur sur une case voisine
        player.TransitToHex(hexX, hexY, 0xff); // Téléporte le joueur sur sa case d'origine
    }
}

It's really not clean, but it works!  ;D
4
News and Announcements / Migrated to a new server
« Last post by Ghosthack on Yesterday at 01:46:30 pm »
We've moved to a new server. Everything might not work fully for some time.
5
Questions and Answers / Re: Dialog
« Last post by KingR on September 21, 2025, 11:01:03 am »
6
Questions and Answers / Re: Companion commands and params
« Last post by Slowhand on June 10, 2025, 12:54:01 am »
You can change your own parameters if you are logged in as ADMIN with `param command:
`param 0 200 150
this will change small guns skill (index = 200) to value 150
to only check your param of small guns (200) you shall not type a 3rd value, so only:
`param 0 200

I do not know a way to change the params of NPC's or companions via admin tools, guess you would need to write one.
You can try to expand on the function "void ExecParamCommand(array<string@>@ command, Critter@ player, Critter@ target)" in cheats.fos for that to work somehow.

Here is an example how (better just copy the whole ExecParamCommand in cheats.fos over to your version) and then stand next (facing toward, 1 hex) a target critter, type:
`param 1 0
it will show the ST of that critter or type:
`param 1 0 10
to set the ST of that critter to 10.

https://github.com/Sasabmeg/FOnline-BraveNewWorld/issues/177

(Again, better just open cheats.fos from BNW repo and copy the whole function named ExecParamCommand, than check the diffs, easier probably)

Also for question use Rotators Discord or BNW discords, if you want faster replies.
https://discord.gg/MuhRYZF
https://discord.gg/fwwjvKbNEu

7
Questions and Answers / Re: Companion commands and params
« Last post by Gimper on June 08, 2025, 02:42:51 am »
Bump. I could really use a hand. For players AND npcs.
8
i build FOnline from Cvet repository
https://github.com/cvet/fonline

and get these files
https://postimg.cc/62nsQMqj

there is no exe file to run
i do not understand what to do with these files

please help
9
Questions and Answers / Re: Dialog
« Last post by Thatgun on April 02, 2025, 12:29:49 am »
10
Questions and Answers / How to post images here ?
« Last post by Thatgun on April 02, 2025, 12:28:35 am »


i try to use freeimage but img not shown in post

this doesn't work:
 _img_ https://freeimage.host/i/3RVdccQ _/img_
Pages: [1] 2 3 ... 10