View unanswered posts | View active topics It is currently Fri Apr 17, 2026 6:31 pm



Reply to topic  [ 9 posts ] 
 Is it possible to process too fast for some scripts? 
Author Message
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 4016
Location: USA
Unread post Is it possible to process too fast for some scripts?
I'm now running on a Win7, 3.3 hex core with 8 GB of ram.

I think this machine may be processing some scripts too fast.

For an example, furb.cts, the one I had didn't load at all. One of my teammates sent me his copy and is runs but does not put holds on the ships.

The furb.cts script works just fine for the rest of my corp mates.

Is anyone else seeing this as well?

_________________

BOTE 1998 Champs: Team Fament
HHT 2015 Champs: Cloud09
Big Game 2016 Champs: Draft team
HHT 2018 Champs: Rock Stars
Big Game 2019 Champs: Draft Team


Classic Style Games Here:
telnet://crunchers-twgs.com:2002

Web page from 1990's: https://web.archive.org/web/20170103155645/http://tradewars.fament.com/Cruncher/tradewar.htm
Blog with current server info: http://cruncherstw.blogspot.com
Discord: https://discord.gg/4dja5Z8
E-mail: Cruncherstw@gmail.com
FaceBook: http://www.facebook.com/CrunchersTW


Sun Jul 29, 2012 7:39 am
Profile ICQ WWW
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1838
Location: Guam USA
Unread post Re: Is it possible to process too fast for some scripts?
Cruncher wrote:
I'm now running on a Win7, 3.3 hex core with 8 GB of ram.

I think this machine may be processing some scripts too fast.

For an example, furb.cts, the one I had didn't load at all. One of my teammates sent me his copy and is runs but does not put holds on the ships.

The furb.cts script works just fine for the rest of my corp mates.

Is anyone else seeing this as well?

Yes it is possible for scripts to run too fast , the way they were coded a few years ago.
Today the scriptwriter has to take that into account and put pacing in to slow it down just enough to grab what it needs at certain prompts.

Some of the older scripts that use includes also have to be re-tailored because of the old way of scripting and the matter of pacing.

Vid

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Sun Jul 29, 2012 10:09 am
Profile WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: Is it possible to process too fast for some scripts?
Text waits are particularly susceptible to race conditions. That's why SWATH was trying to convert to a more event-driven approach.

_________________
Suddenly you're Busted!


Sun Jul 29, 2012 2:00 pm
Profile WWW
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 4016
Location: USA
Unread post Re: Is it possible to process too fast for some scripts?
Is there any way to keep basic Mombot scripts viable for newer, faster processors and connections or have we began to hit the wall here?

_________________

BOTE 1998 Champs: Team Fament
HHT 2015 Champs: Cloud09
Big Game 2016 Champs: Draft team
HHT 2018 Champs: Rock Stars
Big Game 2019 Champs: Draft Team


Classic Style Games Here:
telnet://crunchers-twgs.com:2002

Web page from 1990's: https://web.archive.org/web/20170103155645/http://tradewars.fament.com/Cruncher/tradewar.htm
Blog with current server info: http://cruncherstw.blogspot.com
Discord: https://discord.gg/4dja5Z8
E-mail: Cruncherstw@gmail.com
FaceBook: http://www.facebook.com/CrunchersTW


Sun Jul 29, 2012 2:33 pm
Profile ICQ WWW
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1838
Location: Guam USA
Unread post Re: Is it possible to process too fast for some scripts?
Cruncher wrote:
Is there any way to keep basic Mombot scripts viable for newer, faster processors and connections or have we began to hit the wall here?


Yes of course , I believe that is what someone is doing with the rewrite.
Keeping it up to date , fixing previous script flaws.

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Sun Jul 29, 2012 5:53 pm
Profile WWW
Gameop
User avatar

Joined: Tue Nov 19, 2002 3:00 am
Posts: 1050
Location: USA
Unread post Re: Is it possible to process too fast for some scripts?
It's really just a matter of addressing the lack of wait's/pauses in the current script's.

_________________
Dark Dominion TWGS
Telnet://twgs.darkworlds.org:23
ICQ#31380757, -=English 101 pwns me=-
"This one claims to have been playing since 1993 and didn't know upgrading a port would raise his alignment."


Tue Jul 31, 2012 5:02 pm
Profile ICQ
1st Sergeant
User avatar

Joined: Fri Sep 13, 2002 2:00 am
Posts: 38
Location: New Zealand
Unread post Re: Is it possible to process too fast for some scripts?
I have been having this trouble for years now. I have very fast processors and a slow connection between NZ and Guam and the US.
I was in the process of emailing Vid about one of my scripts missing a trigger . I just happened upon this topic by chance. Probably explains what is happening. My problem is how to find if my ship is carrying Photons or not without using a trigger

_________________
"Let slip the carrion dogs of war"


Tue Jul 31, 2012 7:21 pm
Profile ICQ YIM WWW
Boo! inc.
User avatar

Joined: Sat Oct 09, 2004 2:00 am
Posts: 865
Location: USA
Unread post Re: Is it possible to process too fast for some scripts?
motrax wrote:
I have been having this trouble for years now. I have very fast processors and a slow connection between NZ and Guam and the US.
I was in the process of emailing Vid about one of my scripts missing a trigger . I just happened upon this topic by chance. Probably explains what is happening. My problem is how to find if my ship is carrying Photons or not without using a trigger


I don't think it is. Using a trigger is fine. You probably need to slow down the script a little with a waiton if im reading this right?

_________________
“The object of war is not to die for your corp but to make the other bastard die for his.”

Boo! inc.


Tue Jul 31, 2012 7:27 pm
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1134
Location: Augusta, GA
Unread post Re: Is it possible to process too fast for some scripts?
It's been my experience that a properly written script is not vulnerable to pacing (speed and latency) issues. But it's also been my experience that a lot of scripts aren't written perfectly. I would say that in almost every case where there's a problem (as in it worked before or works sometimes), it's because the script used setTextTrigger instead of setTextLineTrigger, or a text trigger was set without a waitOn before it to ensure other processing has occurred.

So let me elaborate. Let's say you want to grab the density manually from a density scan. You might do something like:
Code:
setTextTrigger densityTrigger :getDensity "Sector"
send "sd"
pause

:getDensity
getWord CURRENTLINE $density 4
Remember that a line from a density scan looks something like:
Sector 792 ==> 100 Warps : 2 NavHaz : 0% Anom : No
So no problem, it looks good right? FAIL - It turns out that this code actually suffers from both of the problems that I mentioned. Since this is a text trigger, the only thing that you can be sure of is that the triggering text "Sector" has been seen. So CURRENTLINE could be "Sector 792 ==>", or maybe just "Sector". How then can you grab the 4th word using getWord? Instead, you should have used setTextLineTrigger, which ensures the entire line after the triggering text is captured. A setTextLineTrigger is kinda like a 2-part trigger: it begins firing when the text is seen, and ends when the carriage return is seen, so CURRENTLINE returns the entire line. And a faster CPU or slower connection will really bring these triggering missteps to light.

But wait, there's a second problem with that code snippet. If you were to change the send text to "dsd", it will end up triggering on the Sector display rather than the density scan since the triggering text "Sector" will be seen at the wrong time. So here the key is to limit when the trigger can fire to a point just before the desired text is displayed. I like to use a waitOn for text that is consistently displayed just before the text I'm interested in, and never seen otherwise. So in this case, the optimal way to write it would be as follows:
Code:
send "sd"
waitOn "Relative Density Scan"
setTextLineTrigger densityTrigger :getDensity "Sector"
pause

:getDensity
getWord CURRENTLINE $density 4
So here the waitOn prevents the TEXTLINE trigger from becoming active until the last possible moment, and you can be sure CURRENTLINE will be complete when it fires.

So let me give you script writers 2 cardinal rules for triggers:
1. Strive to waitOn unique text before your trigger, then set your trigger.
2. Use textline triggers unless you can't. (And if you don't know, you should ask why you sometimes can't.)

+EP+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Tue Jul 31, 2012 8:53 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.