The online racing simulator
PHPInSimMod - PRISM 0.4.6 Discussion
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)
You're my hero. Nice job man!
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.
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.
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
?>


-
(cargame.nl) DELETED by T3charmy : Really dude? drop it already.
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
"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.
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.
Thumbs up
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.
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.
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.

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.
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.
Quote from SsaintLTU :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

Post your hosts.ini file, or send it too me via PM. The part here Invalid socket type set for 127.0.0.1:29999 is your issue. PRISM should of gracefully shut down when it had no hosts to connect too because they were all invalid. The error is a bug, and one that we should handle, but the error started from an malformed hosts.ini file, or a miss-configured one.

The error starts here in PRISM's core and is not handled outside of that functions scope when there is no hosts too connect too.
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
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
Why is the PHP ending tag ?> removed in several files? Looks unnatural to me but maybe I'm too old and this is some new kind of coding style?
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.
Right.. It's completely unrelated with what I am searching for .. I am ExamDiff'ing my code against the original code.

The problem is I get this;


< IS_REO Packet from s2.
PHP NOTICE:
Undefined index: PLID33 in /modules/prism_packets.php on line 1602
1 :: unpack in /modules/prism_packets.php:14
2 :: __conStruct in /modules/prism_hosts.php:486
3 :: handlePacket in /modules/prism_hosts.php:340
4 :: checkTraffic in /PHPInSimMod.php:226
PHP NOTICE:
Undefined index: PLID34 in /modules/prism_packets.php on line 1602
1 :: unpack in /modules/prism_packets.php:14
2 :: __conStruct in /modules/prism_hosts.php:486
3 :: handlePacket in /modules/prism_hosts.php:340
4 :: checkTraffic in /PHPInSimMod.php:226
PHP NOTICE:
Undefined index: PLID35 in /modules/prism_packets.php on line 1602
1 :: unpack in /modules/prism_packets.php:14
2 :: __conStruct in /modules/prism_hosts.php:486
3 :: handlePacket in /modules/prism_hosts.php:340
4 :: checkTraffic in /PHPInSimMod.php:226
PHP NOTICE:
Undefined index: PLID36 in /modules/prism_packets.php on line 1602
1 :: unpack in /modules/prism_packets.php:14
2 :: __conStruct in /modules/prism_hosts.php:486
3 :: handlePacket in /modules/prism_hosts.php:340
4 :: checkTraffic in /PHPInSimMod.php:226
PHP NOTICE:
Undefined index: PLID37 in /modules/prism_packets.php on line 1602
1 :: unpack in /modules/prism_packets.php:14
2 :: __conStruct in /modules/prism_hosts.php:486
3 :: handlePacket in /modules/prism_hosts.php:340
4 :: checkTraffic in /PHPInSimMod.php:226
PHP NOTICE:
Undefined index: PLID38 in /modules/prism_packets.php on line 1602
1 :: unpack in /modules/prism_packets.php:14
2 :: __conStruct in /modules/prism_hosts.php:486
3 :: handlePacket in /modules/prism_hosts.php:340
4 :: checkTraffic in /PHPInSimMod.php:226
PHP NOTICE:
Undefined index: PLID39 in /modules/prism_packets.php on line 1602
1 :: unpack in /modules/prism_packets.php:14
2 :: __conStruct in /modules/prism_hosts.php:486
3 :: handlePacket in /modules/prism_hosts.php:340
4 :: checkTraffic in /PHPInSimMod.php:226
PHP NOTICE:
Undefined index: PLID40 in /modules/prism_packets.php on line 1602
1 :: unpack in /modules/prism_packets.php:14
2 :: __conStruct in /modules/prism_hosts.php:486
3 :: handlePacket in /modules/prism_hosts.php:340
4 :: checkTraffic in /PHPInSimMod.php:226
< IS_RST Packet from s2.

I am not sure if thats being caused by me.

I don't get it, the server is running G15.

edit:

shouldnt this;


<?php 
    
const PACK 'CCCCC32';
    const 
UNPACK 'CSize/CType/CReqI/CNumP/C32PLID';
?>

be something different? Like, 40?

And byte size 44 instead of 36... Hmm let's see.
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
  • 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).
Excellent job T3!
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.
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.

Don't forget to add NCI's definition too the ClientHandler class, as it falls in to that area as well.

FGED GREDG RDFGDR GSFDG