The online racing simulator
Searching in All forums
(363 results)
T3charmy
S3 licensed
Quote from Scawen :
Quote from T3charmy :Ah alright, well, if possible, could I get the updated one when you get around to it, as well as if you add any new objects beyond that?

I have attached the updated specification to this post. Please let me know if there are any mistakes or it's not clear.

Thanks! For now I'm good I think.

Quote from cargame.nl :Leave the packet alones! Big grin

Nah, seriously.. Full IPv6 readyness will imply another incompatible patch anyway when the world is changing to that format, lets change it when it's actually needed.

I dunno, I think now would be a good time to add it considering this hasn't been released yet. How ever, I know, my home connection has IPV6. While, less than 7% of the people who access google have actually adopted IPV6 so far(source), if you look at the graph, you'll see how much it's picking it's pace up, (2.8% on April 1st of last year, 6.3% as of March 30th) I think now would be a good time if we're going to introduce the functionality.
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :
Quote from T3charmy :

if (Index >= AXO_CONCRETE_SLAB && Index <= AXO_CONCRETE_RAMP_WALL)
{
// Concrete objects - always floating regardless of 0x80 bit
// Flags byte contains various attributes depending on the object
// Each concrete object has three attributes

Attributes:

name bits values

Width : 0x03 >> 0 : 2, 4, 8, 16
Length : 0x0c >> 2 : 2, 4, 8, 16
Size X : 0x03 >> 0 : 0.25, 0.5, 0.75, 1
Size Y : 0x0c >> 2 : 0.25, 0.5, 0.75, 1
Height : 0xf0 >> 4 : 0.25 to 4 in steps of 0.25
Pitch : 0xf0 >> 4 : 0 to 90 in steps of 6 degrees
Colour : 0x03 >> 0 : grey / red / blue / yellow

Attributes used by each object:

AXO_CONCRETE_SLAB : Width / Length / Pitch
AXO_CONCRETE_RAMP : Width / Length / Height
AXO_CONCRETE_WALL : Colour / Length / Height
AXO_CONCRETE_PILLAR : Size X / Size Y / Height
AXO_CONCRETE_SLAB_WALL : Colour / Length / Pitch
AXO_CONCRETE_RAMP_WALL : Colour / Length / Height
}


That's gonna be a bitch. Put simply, there are 6 different ways to read that struct now based off the Index . Meaning the the UNPACK and PACK functions have to change slightly for it.

Where is AXO_CONCRETE_SLAB, ect defined? I'm not seeing them in my InSim.txt file for 0.6G18.


<?php 
    
private function concrete_parse($index$bits)
    {
        switch(
$index)
        {
            case 
AXO_CONCRETE_SLAB:
                
$name 'Width/Length/Pitch';
                break;
            case 
AXO_CONCRETE_RAMP:
                
$name 'Width/Length/Height';
                break;
            case 
AXO_CONCRETE_WALL:
                
$name 'Color/Length/Height';
                break;
            case 
AXO_CONCRETE_PILLAR:
                
$name 'SizeX/SizeY/Pitch';
                break;
            case 
AXO_CONCRETE_SLAB_WALL:
                
$name 'Colour/Length/Pitch';
                break;
            case 
AXO_CONCRETE_RAMP_WALL:
                
$name 'Colour/Length/Height';
                break;
            default:
                
// No idea why we would get here.
                
break;
        }

        foreach (
explode('/'$name) as $name)
            
$packet[$name] = self::concret_bits($name$bits);
    }

    private function 
concrete_bits($name$bits)
    {
        switch (
$name)
        {    
// Some of these will not return the correct value yet.
            
case 'Width':
                return 
$bits 0x03 >> 0# 2, 4, 8, 16
            
case 'Length':
                return 
$bits 0x0c >> 2# 2, 4, 8, 16
            
case 'SizeX':
                return 
$bits 0x03 >> 0# 0.25, 0.5, 0.75, 1
            
case 'SizeY':
                return 
$bits 0x0c >> 2# 0.25, 0.5, 0.75, 1
            
case 'Height':
                return 
$bits 0xf0 >> 4# 0.25 to 4 in steps of 0.25
            
case 'Pitch':
                return 
$bits 0xf0 >> 4# 0 to 90 in steps of 6 degrees
            
case 'Colour':
                return 
$bits 0x03 >> 0# grey / red / blue / yellow
        
}
    }
?>

Base on the information I have, these helper functions should work for you. But I have no idea where these functions belong, because I don't know where the new defines are.

I was given this: https://www.lfs.net/forum/post/1885434#post1885434
T3charmy
S3 licensed
Quote from Scawen :
Quote from T3charmy :
Quote from sicotange :Is this what you are looking for?

Yes it is, where did you get that? I checked the docs folder wasn't there.

I sent it to sicotange recently.

It needs a couple of updates for the two new objects.

Ah alright, well, if possible, could I get the updated one when you get around to it, as well as if you add any new objects beyond that? still trying to cipher through attempting to convert this to PHP for PRISM:


if (Index >= AXO_CONCRETE_SLAB && Index <= AXO_CONCRETE_RAMP_WALL)
{
// Concrete objects - always floating regardless of 0x80 bit
// Flags byte contains various attributes depending on the object
// Each concrete object has three attributes

Attributes:

name bits values

Width : 0x03 >> 0 : 2, 4, 8, 16
Length : 0x0c >> 2 : 2, 4, 8, 16
Size X : 0x03 >> 0 : 0.25, 0.5, 0.75, 1
Size Y : 0x0c >> 2 : 0.25, 0.5, 0.75, 1
Height : 0xf0 >> 4 : 0.25 to 4 in steps of 0.25
Pitch : 0xf0 >> 4 : 0 to 90 in steps of 6 degrees
Colour : 0x03 >> 0 : grey / red / blue / yellow

Attributes used by each object:

AXO_CONCRETE_SLAB : Width / Length / Pitch
AXO_CONCRETE_RAMP : Width / Length / Height
AXO_CONCRETE_WALL : Colour / Length / Height
AXO_CONCRETE_PILLAR : Size X / Size Y / Height
AXO_CONCRETE_SLAB_WALL : Colour / Length / Pitch
AXO_CONCRETE_RAMP_WALL : Colour / Length / Height
}

T3charmy
S3 licensed
Trying to cipher through this(for modules/prism_layoutobject.php), I assume some sort of changes need to be made to handle this:

if (Index >= AXO_CONCRETE_SLAB && Index <= AXO_CONCRETE_RAMP_WALL)
{
// Concrete objects - always floating regardless of 0x80 bit
// Flags byte contains various attributes depending on the object
// Each concrete object has three attributes

Attributes:

name bits values

Width : 0x03 >> 0 : 2, 4, 8, 16
Length : 0x0c >> 2 : 2, 4, 8, 16
Size X : 0x03 >> 0 : 0.25, 0.5, 0.75, 1
Size Y : 0x0c >> 2 : 0.25, 0.5, 0.75, 1
Height : 0xf0 >> 4 : 0.25 to 4 in steps of 0.25
Pitch : 0xf0 >> 4 : 0 to 90 in steps of 6 degrees
Colour : 0x03 >> 0 : grey / red / blue / yellow

Attributes used by each object:

AXO_CONCRETE_SLAB : Width / Length / Pitch
AXO_CONCRETE_RAMP : Width / Length / Height
AXO_CONCRETE_WALL : Colour / Length / Height
AXO_CONCRETE_PILLAR : Size X / Size Y / Height
AXO_CONCRETE_SLAB_WALL : Colour / Length / Pitch
AXO_CONCRETE_RAMP_WALL : Colour / Length / Height
}

Done a couple more pushes, look over them when you get a chance I guess:
  • Changes for 0.6H, still need to finish updating this (34257a4)[Missed a comma on this one... a7770b0)]
  • add NCI packet to state handler (328dc96)
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :
Quote from T3charmy :Dygear, You'd probably know where should I put the NCI in the state handler? should I put it where NCI is or should I just make a new function. Could you possibly take care of that? haha.

I think I would stick it in with the onClientPacket. It adds too that information about the client, so for me that seems like the most apporiate area for it.

Hmm alright, I'll work on that when I get home. almost done here in class.
T3charmy
S3 licensed
Dygear, You'd probably know where should I put the NCI in the state handler? should I put it where NCN is or should I just make a new function. Could you possibly take care of that? haha.
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from sicotange :Is this what you are looking for?

Yes it is, where did you get that? I checked the docs folder wasn't there.
T3charmy
S3 licensed
Scawen, I'm in process of updating PRISM, is there a place I can find the Object IDs for the new items?

This is what we have now: https://github.com/Dygear/PRISM/blob/master/modules/prism_layoutobject.php#L578
T3charmy
S3 licensed
  • Version changed to 0.4.6.2
  • Increased Insim Version to 6. (16da97c)
  • Fix insim packets for G14. Was done incorrectly previously. (16da97c)
  • Add new ISP_NCI packet introduced in 0.6G16 (4844eec & 7460a88)
Download available here

Edit: Just noticed I still need to add NCI to state handler, will take care of after my last class for the night(4-5 hours from now).
Last edited by T3charmy, .
T3charmy
S3 licensed
Yep you're right. I knew there had to be more to it when I was changing code, my bad, let me know if that works, if it does I'll fix it up when I get a chance.

Edit: I pushed a new commit with everything fixed properly. I changed the wrong stuff in my last update. I'll make a new zip after I get back from class in 2 hours. Smile
Last edited by T3charmy, .
T3charmy
S3 licensed
From PHP.net manual:

If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag, which may cause unwanted effects because PHP will start output buffering when there is no intention from the programmer to send any output at that point in the script.
T3charmy
S3 licensed
PHPInSimMod (PRISM) Hotfix 0.4.6.1
  • Version changed to 0.4.6.1
  • Added missing semicolon to the welcome plugin
  • Increase player track limit to 40
  • Fix bugs reported in this thread
  • Moved PRISM Docs to GitHub
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :
Quote from T3charmy :I'm gonna try an add instructions on how to do alternating text & more information on GUI clusters(wasn't in LFSLapper, but It's a nice features to have), I've thought about coding something in the ButtonManager to allow plugin devs to add ability to move GUIs without having to code their own methods that interface with the built-in betterButtonManagerFunctions(MoveGUIClusterV[ertically],MoveGUIClusterH[orizontally],MoveGUIClusterD[iagonally]). Once I have more time I'll probably add that functionality somehow.

You can do that with delta. You define the group as starting at 0, 0 and built the .ini file to match that, then from there, you can move the cluster around the screen by moving the starting point simply by adding to each buttons Top and Left values. I guess the .ini files should have a default top and left value that should be over ridden when the user needs, or can be set on a per client basis from within PRISM's instance. And if the PRISM server is running across multiple instances then those settings can be remembered on multiple servers.

Delta? As for my plans, since I can't quite make commands(due to the many possible instances of bBM), I can just make a function in my bBM that the plugin dev could call that would bring up a movement GUI and handle all the stuff on the Button Manager side. less coding for the plugin dev. more universal code for everyone. Smile

Quote from Dygear :
Quote from T3charmy :Edit: Dygear when you get a chance can you verify I changed the right stuff for the latest test patch? feel free to reverse the commit.

I think you nailed it from the diff that I could see. When I try to read the whole file as a diff on github the request fails. I think github is still getting DDoSed. But everything looks good right now too me.

Awesome. Smile

Quote from Dygear :LMAO, there is an epicly small bug in 0.4.6.0. When you start the welcome plugin it fails to start the server because there is no ; at the end of line 33. Quick fix has been posted too github. No need for a dot release for something as simple as that.

ouch, didn't notice that. x.o But hey! at least you see how easy it is to use the button manager. Big grin

I'll get a new zip posted after breakfast. Smile
T3charmy
S3 licensed
Quote from cargame.nl :I simply removed it myself a long time ago but I am always a bit unsure if my changes are good enough to be public so I never submitted it on gitHUB.

But I will try this 0.4.6, this betterbuttonmanager sounds interesting.

Here was my latest attempt, I tried the fix you suggested back in 0.4.4 and it caused issues with other plugins so I had to develop something else.
https://github.com/Dygear/PRISM/commit/4103e4e4e8c964dcd7a216e9a38628be69aac2c8

I included a readme for the betterButtonManager, it's not a complete readme just yet, it covers most of it. I can't remember if you did stuff with LFSLapper or not, but I tried to add a few features from there(though some things are done slightly different, I'm gonna try an add instructions on how to do alternating text & more information on GUI clusters(wasn't in LFSLapper, but It's a nice features to have), I've thought about coding something in the ButtonManager to allow plugin devs to add ability to move GUIs without having to code their own methods that interface with the built-in betterButtonManagerFunctions(MoveGUIClusterV[ertically],MoveGUIClusterH[orizontally],MoveGUIClusterD[iagonally]). Once I have more time I'll probably add that functionality somehow.
T3charmy
S3 licensed
Quote from cargame.nl :Thumbs up

Quote from cargame.nl :double state info bug on startup does still exist in this version
( https://www.lfsforum.net/showt ... php?p=1806415#post1806415 )

While I'm thinking about it, have you gotten a chance to test 0.4.6? I believe I've done a more proper fix for this issue.
T3charmy
S3 licensed
Quote from cargame.nl :"Really dude? drop it already." ...

No I am not dropping it, he is reporting not working stuff all the time which is absolutely plausible when you hacked servers/account.

Then report it to someone who can do something. nothing going to be done here. as far as I have seen, he hasn't done anything with PRISM that would be questionable.
T3charmy
S3 licensed
Quote from SsaintLTU :Hmm...

<?php 
Loaded cvars
.ini
Loaded hosts
.ini
Invalid socket type set 
for 127.0.0.1:29999
Host server will be excluded
.
Loaded http.ini
Loaded telnet
.ini
Loaded admins
.ini
Loaded plugins
.ini
Loading plugins
Loading plugin
admin
Loading plugin
debugger
Loading plugin
gmeter
Loading plugin
iTunes

Notice
Undefined index:  in C:\xampp\cruise\modules\prism_hosts.php on line 589

Fatal error
Call to a member function isRelay() on null in C:\xampp\cruise\modules\prism_hosts.php on line 591
?>



looks like a problem on your end with the way it's setup, not getting that issue here, nor did yisc on his server.

Quote from Dygear :I'm hoping that Vic will pickup the WebSockets module for 0.5.0. *Hint, Hint, Nudge, Nudge*

I'll look over the changes tonight when I get home.

I didn't change much for it yet, but sounds good! You know more about the packets then I do, I just try to fix the bugs reported to me without breaking other stuff. Nod
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :You're my hero.

What makes you say that haha?

Quote from Dygear :Nice job man!

Thanks. haha. Been working with Yisc[NL] who made stuff on LFSLapper. I made the betterButtonManager a while back when I was working on cruise there were a lot of nice button related features that LFSLapper had back when I used it, deiced PRISM could use them.

Edit: Dygear when you get a chance can you verify I changed the right stuff for the latest test patch? feel free to reverse the commit.
Last edited by T3charmy, .
PHPInSimMod - PRISM 0.4.6 Discussion
T3charmy
S3 licensed
You can download PHPInSimMod - PRISM 0.4.6 from that link. Please use this thread to talk about this release.

Thank you.

PHPInSimMod (PRISM) 0.4.6
  • Version changed to 0.4.6
  • new "betterButtonManager" adds a bunch of features
    • Alternating Text(seen in LFSLapper)
    • Ability to set a time length to display buttons(seen in LFSLapper)
    • Ability to have GUI Clusters and be able to move them in any direction
  • Updated Welcome plugin to use new betterButtonManager
  • Add new Handicap packet
  • new debug plugin
  • the last fix for the Double NCN packets broke plugins like reorder. this has a more proper(but still somewhat temporary fix)
  • Fix messages(IS_MTC, IS_MST, IS_MSX, IS_MSL) that are longer then the LFS specified length being split and last part of message sending twice.
PHPInSimMod (PRISM) 0.4.6.1
  • Version changed to 0.4.6.1
  • Added missing semicolon to the welcome plugin
  • Increase player track limit to 40
  • Fix bugs reported in this thread
  • Moved PRISM Docs to GitHub
PHPInSimMod (PRISM) 0.4.6.2
  • Version changed to 0.4.6.2
  • Increased Insim Version to 6. (16da97c)
  • Fix insim packets for G14. Was done incorrectly previously. (16da97c)
  • Add new ISP_NCI packet introduced in 0.6G16 (4844eec & 7460a88)
PHPInSimMod (PRISM) 0.4.6.3
  • Version changed to 0.4.6.3
  • Fixed incorrect variable in welcome plugin
  • Reformat code to use spaces not tabs
  • Fix bugs, that has broken buttons since 2012(Not sure how this was never caught before)
  • Fully Support the NCI packet, and properly format IPs
  • Fixed slight issue with RCM command in admin.php plugin
  • Fixed the wrong variable in if statement when adding a click event to a button using betterButtonManager
  • Added 2 new objects to prism_layoutobject
PHPInSimMod (PRISM) 0.4.6.4
  • Version changed to 0.4.6.4
  • Fixed Issue with IS_REO so that it now works correctly(in some cases, the old method could crash PRISM).
  • Updated Reorder plugin
  • Added a TranslationEngine(Might need some fine tuning(See notes here)
  • PHP Standards[Sweep #1] by Zenware
  • You can now send a button an array of text on creation for alternating text.
  • Commands are no longer case sensitive(Let me know if you disagree with this change)
Last edited by T3charmy, .
PHPInSimMod (PRISM) 0.4.6
T3charmy
S3 licensed
PHPInSimMod (PRISM) 0.4.6
  • Version changed to 0.4.6
  • new "betterButtonManager" adds a bunch of features
    • Alternating Text(seen in LFSLapper)
    • Ability to set a time length to display buttons(seen in LFSLapper)
    • Ability to have GUI Clusters and be able to move them in any direction
  • Updated Welcome plugin to use new betterButtonManager
  • Add new Handicap packet
  • new debug plugin
  • the last fix for the Double NCN packets broke plugins like reorder. this has a more proper(but still somewhat temporary fix)
  • Fix messages(IS_MTC, IS_MST, IS_MSX, IS_MSL) that are longer then the LFS specified length being split and last part of message sending twice.
PHPInSimMod (PRISM) 0.4.6.1
  • Version changed to 0.4.6.1
  • Added missing semicolon to the welcome plugin
  • Increase player track limit to 40
  • Fix bugs reported in this thread
  • Moved PRISM Docs to GitHub
PHPInSimMod (PRISM) 0.4.6.2
  • Version changed to 0.4.6.2
  • Increased Insim Version to 6. (16da97c)
  • Fix insim packets for G14. Was done incorrectly previously. (16da97c)
  • Add new ISP_NCI packet introduced in 0.6G16 (4844eec & 7460a88)
PHPInSimMod (PRISM) 0.4.6.3
  • Version changed to 0.4.6.3
  • Fixed incorrect variable in welcome plugin
  • Reformat code to use spaces not tabs
  • Fix bugs, that has broken buttons since 2012(Not sure how this was never caught before)
  • Fully Support the NCI packet, and properly format IPs
  • Fixed slight issue with RCM command in admin.php plugin
  • Fixed the wrong variable in if statement when adding a click event to a button using betterButtonManager
  • Added 2 new objects to prism_layoutobject
PHPInSimMod (PRISM) 0.4.6.4
  • Version changed to 0.4.6.4
  • Fixed Issue with IS_REO so that it now works correctly(in some cases, the old method could crash PRISM).
  • Updated Reorder plugin
  • Added a TranslationEngine(Might need some fine tuning(See notes here)
  • PHP Standards[Sweep #1] by Zenware
  • You can now send a button an array of text on creation for alternating text.
  • Commands are no longer case sensitive(Let me know if you disagree with this change)
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :Do you have anything pressing that needs to be added also into the patch, if so, I guess now is a good time to do it.

As far as I'm concerned T3, your running this show.

not as of right now, been too busy with work and school to have free time to make any new features or anything like that. I'll make up a release patch when I get a chance
T3charmy
S3 licensed
Quote from Dygear :
Quote from cargame.nl :and its 56, not 66.

Haha, copied Scawen's Mistake.

And I've fixed it on GitHub, thank you.

Just noticed this, would you like me to make an updated release?
T3charmy
S3 licensed
Quote from Scawen :One question to anyone who knows: Do all SM2 shaders compile without complication in SM3 mode? LFS default ones do but they are simple...

From what I can tell there shouldn't be any issue with that.
T3charmy
S3 licensed
Quote from Dygear :I've shied away from doing documentation, because the API is not solid until 1.0. (I'll just wait for cargame to make a comment on how that will never happen.

Someday we'll hit 1.0...

Quote from Dygear : I like the idea of the number of running instances that PRISM has running. I guess we could make a pingback plugin that gives us this stats, log information like Host Name, IP address, number of clients on the sever. It can update this information as client's leave / join.

Sounds good. I was gonna make it built in to PRISM but that works too!
T3charmy
S3 licensed
Quote from Dygear :Oh! I own the domain PRISM.IO, send it over what you have and I'll put it on my web server. I'll give you SSH access once I'm setup.

Wrong kind of website... but I can make one of those too! Just give me a few days. :P

Edit: What exactly would you like on the website? One thing I thought about was server stats such as X amount of PRISM instances running on Y amount of LFS servers. various examples as well as a function list and how they're used. Also various things that can be done with PRISM etc.
Last edited by T3charmy, .
FGED GREDG RDFGDR GSFDG