Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Sebastian

#46
Quote from: Kenneth Law on Aug 26, 2022, 03:49 AMSeby, do you know what flags value refers to?

They affect the behavior of an object, when put under certain conditions like.
Here is a list, and their meaning:
https://gtamods.com/wiki/Item_Definition#IDE_Flags

In VC's files, flags are declared in the .ide file.
In Map Editor MEd, flags are known as "parameters".


Just make sure you follow the wiki values, as they are per game. I'm not sure about MEd, but it may share the same with all 3 games (gta3, vc, sa), so you may check the "Breakable Window 1" and get a value, which will actually apply the "Breakable Window 2" flag

PS: Just in case you didn't know, you can also edit the physics of an object.
So you can turn a custom object into a beach ball like, for e.g.
#47
Community Plugins / Re: Discord Plugin
Aug 16, 2022, 09:10 AM
Damn, was really wondering what happened to my server...
#48
Note: Seems to happen when game is loaded in FULL SCREEN mode. (not windowed)



2am:


5am:
Here are my conclusions, after some more testing.

Vice City's Menu opening speed will start decreasing when there are >20 labels onscreen/hidden, with:
  • FontFlags (no matter which ones)
  • FontSize different than 11 (default)

Here is a code to test on:
function test() {
arr <- array(100);
for (local i = 0; i < arr.len(); i++) {
arr[i] = GUILabel( VectorScreen( 300, 300 ), Colour( 255,255,255 ), "FontSize changing + ESC to MENU speed!" );
arr[i].FontFlags = GUI_FFLAG_OUTLINE;
arr[i].FontSize = 11;
Console.Print( "created label no " + i );
}
}
test();

Test it. Works fine right? 100 labels.
Now change .FontSize value to anything else than 11, and try to enter the VC Menu.
Slow.
Now remove the .FontFlags, and enter the VC Menu again.
Fast, hm ? :p
#49
  • Fixed 'onObjectShot' for explosions being called for everyone.

Always wondered what's going on with the explosions; didn't know it was actually a thing

  • Hopefully fixed a few issues with the Steam version
I remember there was a crash for steam users, when a molotov explosion would be created through script.
Will try to reach that guy and test again!
  • New splash screen (credits to Spiller, thanks!)

Good job, @Spiller !
#50
@vito shared this in discord, for calculating weapon flags.
http://spaceeinstein.altervista.org/weap_vc.php

Don't forget that, when applying in vcmp, you must add "0x" before the flags, as it must be in hex.
E.g.:
Quote from: stormeus vl8 rel000SetWeaponDataValue(33, 25, 0x020040); // FieldFlags
#51
The TO-DO list usually never ends for me, haha.
That's why I suck at finishing stuff => I never finish applying all my ideas, as new ones come every day.
In my case, some strategy helps, like organizing tasks and think exactly what I want from the product, for a first version.
But, especially when you work on your own product, on your free-time, things can get boring and you just decide to move to some other step, and then return to this one when you feel so. But that's not my case. So I just leave some things undone and don't even wanna go back to it.

So I think it's better for me to get paid and do what somebody else's want, haha, if you can believe that.
But this way, I do finish my stuff.
#52
Quote from: habi on May 25, 2022, 05:42 PMI hope this will be useful to someone who needs to know.

sad that the official wiki is down.

With some luck, it will be back soon!
#53
If you have never put hands or worked with client-side code, then try to read this, it will help a bit.
Original discord conversation:
Link here



For using client-side, you need a main.nut no matter what, inside store/script/...here
(you can also load compiled .nut files (aka .cnut), but that's another story)
((also, if you need a main.nut doesn't mean you must stick to one file only; you can include( "otherfile.nut" ) / dofile( "otherfile.nut" ) ))

So, inside that main.nut, you have a list of events/functions that you can use here:
http://wiki.thijn.ovh/index.php?title=Client-side_Scripting_Resources

In order to send data from SERVER to CLIENT, OR VICEVERSA, you must write/call Streams
Those streams will be received in
function Server::ServerData( stream )if it's sent by server, and

and
function onClientScriptData( player ) if sent by client



Here is a stream example, from server to client:
Stream.StartWrite();
Stream.WriteInt(0); // key / id
Stream.WriteInt(51); // needed value
Stream.SendStream(player);
and here is a stream e.g. from CLIENT -> SERVER
local Data = Stream();
Data.WriteInt(0); // key / id
Data.WriteString("Explosion"); // needed value
Server.SendData(Data);
those keys I've been put into examples must be considered as cases

Sometimes, you send a stream because you want some data related death messages, but sometimes you send a stream because you want position
well, these 2 cases should have an id like. Why ID ? because they are not so heavy
so, when you send data client->server, in function onClientScriptData( player ) you will be able to do something like this:
function onClientScriptData( player )
{
    local id = Stream.ReadInt();
    switch( id ) {
        case 0: {
            // death message related
            local msg = Stream.ReadString();
            MessagePlayer( "Client data received - death message: " + msg, player );
        } break;

        case 1: {
            // position related
        } break;

        default: {
            // even was called, but with an ID not existing in this switch
        } break;
    }
}

Same goes for client-side, when receives data from server:
function Server::ServerData( stream )
{
    local id = stream.ReadInt();
    switch( id ) {
        case 0: {
            // death message related
            local reasonID = stream.ReadInt();
            Console.Print( "Death Reason ID received from Server: " + reasonID );
        } break;

        case 1: {
            // position related
        } break;

        default: {
            // even was called, but with an ID not existing in this switch
        } break;
    }
}

[spoiler="Stream or stream ??"]
be sure you don't get confused when using stream with big S or small s

if server-side, you need to use Stream with big S.
if client-side, you initiate a custom named/created variable with that Stream() function, like you have seen in the examples above

but if in client-side, using the event Server::ServerData( stream ), then you can see that the parameter is named stream with small s.
[/spoiler]

Anyway, the main idea when sending streams is to go as fast as posible
if you gonna use a string as a key, like you did, then tons of data will be used everytime you send that string key
while you could identify the cases by Integers, or even better: Bytes (as there is also Stream().WriteByte)
and that ^ uses a lot less data, and that's for identification only
#54
Looks helpful indeed, especially for when servers have high ping (slow downloading speed).
Are you uploading the `store` directories yourself for the example you just posted (latest post), or it's some trick done so you download the files like you were in server
#55
General Discussion / Re: vcmp client
May 16, 2022, 03:54 AM
Can you show a screenshot of the messages you get from servers?
Maybe you are kicked out because of a modded vice city, or something similar.
#56
Is it the same with the one from your server? :o
I remember it was a perfect alternative. Too bad we cannot actually force stop the default chat to open.


EDIT: Here is a video recorded when were testing it :D back in 2021-01-04-1256
https://youtu.be/bQRcEiZ9E2o
#57
Original discord conversation

PS: Be aware that this fix is a pretty new find, so there can be side-effects.
Didn't yet face anything, but still..



Labels tend to be very buggy sometimes, especially when using different constructors.
(@NewK knows better)

Out of all constructors
Quote from: wikiGUILabel

1. Constructor GUILabel()

2. Constructor GUILabel(position, colour)
Parameter types: VectorScreen, Colour

3. Constructor GUILabel(position, colour, text)
Parameter types: VectorScreen, Colour, string

4. Constructor GUILabel(position, colour, text, flags)
Parameter types: VectorScreen, Colour, string, int

seems that the 4th one works the best. (DecUI is using it too, in it's best way)
Using any other one will lead to weird and obscure behaviour.

Still, here is something that might fix this ^ and can be found here v
label.Size = VectorScreen(0,0);
label.TextPaddingTop = 0; // or Right, or Left, or Bottom, as any of them seem to do the thing
[spoiler=all TextPadding functions]
   label.TextPaddingTop = 0;
   label.TextPaddingBottom = 0;
   label.TextPaddingLeft = 0;
   label.TextPaddingRight = 0;
[/spoiler]

Just apply these settings once you are done with your label. (so, at the end of it)

[spoiler="in case of using DecUI"]
NewK — 04/26/2022
you can use the postConstruct function which will be called after an element is built

"this" in that case is the GUILabel
[/spoiler]



Some bugs that can happen when using other constructors than the (4th) one with 4 arguments.

1. Label might not show up at all, when the text is not long/strong/heavy enough, or has some flags.


2. Labels placed in column might be pushed more to the right

#59
Now imagine the Vice City coming to life, with NPCs simulating the traffic. I would love to see that!
(if you guys do that, please tell me the server ip)

habi, man, I don't know what will happen to vc:mp in the future, but I'm glad you shown people a way to play with NPCs !
Everybody screaming for them. Well, here they are! Everything looks pretty easy to use.

Thanks for this!
#60
Tutorials / Re: Setting big font size in game
Apr 02, 2022, 08:22 PM
Here is a full list: List of values for vcmp_config.txt
It is stickied in Support board.