Author Topic: TrailMyx's Master Rail Engine/Developer  (Read 150825 times)

0 Members and 1 Guest are viewing this topic.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #45 on: June 16, 2009, 11:15:59 AM »
0
Posted version 0.30l

New to version 0.30l (Rail Engine):
  • Fixed a bug in file loading.
  • New method for rail engine to abort when a stop is issued.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #46 on: June 16, 2009, 08:57:24 PM »
0
First off, thank you for the cool update to the RE ver. 'L'.

Now then, before I get too involved with my next script update, I'm experimenting with error handling dealing with the RE. As you know, if a waypoint is too far away from the character (i.e. something blocking movement) the RE script displays the message " waypoint 666 in rail bla bla is far far away" ...or something like that. What I'd think would be a good option for the script writer using the RE is to have a call to disable error messages or at least pause the script until the error has been dealt with via the script making the call.

While I'm continuously debugging my script, every once in a while atm, I get that error display, and it's quite a bugger to load up the rail again after it stops, and get my character off again after testing the error handling part. As I have it set for the moment, I check if the #result = error, if it does, I make have my script deal accordingly with it, and seconds later, I'm off and running. However, if I'm afk, the error display generated by the RE is still present and can cause problems. (I hope I'm not too buzzed to where this post is not making sense  :P )

Personally, I suppose I could temporarily modify the RE to suit me, but I also think it'd be a worthwhile addition to the script itself.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #47 on: June 16, 2009, 09:18:06 PM »
0
No that's a great suggestion.  In fact I have wanted to add that for a while.  Really you still get back a failure if you are looking at return values and status from the rail engine.  The display is really for someone running the rail engine in a called fashion.  That's part of why I didn't release version L because of that and another feature to be able to change the distance the rail engine tries to pathfind to.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #48 on: June 17, 2009, 12:57:35 PM »
0
Quote
No that's a great suggestion.
I assume you mean 'Now'  ;) hehe

Getting the failure back in the result is certainly good. How far were you planning on extending the pathfinding distance? I personally would think 8-10 tiles would be good.  It's twice the distance of the default waypoint setting, and nearly half (I believe) of what the UO client is capable of 'seeing' internally...basically the game screen I think.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #49 on: June 17, 2009, 01:02:01 PM »
0
]
How far were you planning on extending the pathfinding distance?

The idea is to make it configurable for the script author.  So you can just set the value.  The value is computed by:

%xdiff ^2 + %ydiff ^ 2 + %zdiff ^ 2.  This is arbitrarily set to 400.

Quote
No that's a great suggestion.
I assume you mean 'Now'  ;) hehe

Actually, it need a comma....

Quote
No, that's a great suggestion!
« Last Edit: June 17, 2009, 01:05:09 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #50 on: June 17, 2009, 01:20:04 PM »
0
ahh, the 'buzzed' comment, lol I get ya. This tool is turning out to be pretty awesome, now to get moving with using a callback function to open doors !

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #51 on: June 17, 2009, 01:25:45 PM »
0
Well, that's how KilroyIsDead is using the engine, so he's tamed that particular beast.  :)

However, if you are running in server mode, you can open the doors in your main loop.  Might be a bit smoother with a callback because it will pause the rail within the rail code.  Mmmm, options!
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #52 on: June 20, 2009, 05:56:53 PM »
0
Here's something interesting. Often times, when I load up a few rails, say 6 of em, the sixth one won't be listed in the list box, but it still reports as having 6 rails loaded.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #53 on: June 20, 2009, 06:04:24 PM »
0
If you put a small delay after you load the file. this should fix it.  Like wait 10 or something.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #54 on: June 21, 2009, 07:31:24 AM »
0
I don't think I'm doing anything wrong. This is a sub in working. It only loads select rails according to user preference. Just for testing purposes I toggle the Malas and Tok values.

Code: [Select]
GoSub RailInit
set %malas #true
set %tok #false
GoSub SS_Load_Selected_Rails
stop

Sub RailInit
  set %railsubs tool_railengine30l.txt
  call %railsubs TM_GetServerMode ; SERVER, SUBROUTINE, or *blank*
  if #RESULT = SERVER
  {
    call %railsubs TM_PingServer
    if #RESULT = PONG ; server is alive, must reset it and were good to go.
    {
      call %railsubs TM_ServerInitialize ; still need to break a move if in progress....
    }
    else
    {
      display ok Namespace is initialized, but server is not running. Please restart server.
      call %railsubs TM_Close
      stop
    }
    goto skipsetupcheck
  }
  if #RESULT = SUBROUTINE
  {
    display ok You were running in Subroutine mode, please start a server.
    call %railsubs TM_Close
    stop
  }
  display ok No server was found, please start a server session.
  menu hide
  call %railsubs TM_Close
  stop
skipsetupcheck:
return

Sub SS_Load_Selected_Rails
set %railcnt 0
  If %Malas = #true
  {
    set %railcnt %railcnt + 1
    set %rail_label_ . %railcnt Malas_Red_1
    set %railfile_ . %railcnt C:\Malas_Red_1.txt
    call %railsubs TM_LoadRail %railfile_ . %railcnt
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    set %railcnt %railcnt + 1
    set %rail_label_ . %railcnt Malas_Umbra_Blue2
    set %railfile_ . %railcnt C:\Malas_Umbra_Blue2.txt
    call %railsubs TM_LoadRail %railfile_ . %railcnt
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    set %railcnt %railcnt + 1
    set %rail_label_ . %railcnt BrknMtns_Blue2
    set %railfile_ . %railcnt C:\BrknMtns_Blue2.txt
    call %railsubs TM_LoadRail %railfile_ . %railcnt
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    set %railcnt %railcnt + 1
    set %rail_label_ . %railcnt BrknMtns_Red2
    set %railfile_ . %railcnt C:\BrknMtns_Red2.txt
    call %railsubs TM_LoadRail %railfile_ . %railcnt
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    set %railcnt %railcnt + 1
    set %rail_label_ . %railcnt Malas_Blue_1
    set %railfile_ . %railcnt C:\Malas_Blue_1.txt
    call %railsubs TM_LoadRail %railfile_ . %railcnt
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    set %railcnt %railcnt + 1
    set %rail_label_ . %railcnt Malas_Umbra_Red
    set %railfile_ . %railcnt C:\Malas_Umbra_Red.txt
    pause
    call %railsubs TM_LoadRail %railfile_ . %railcnt
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
  }
  If %Tok = #true
  {
    set %railcnt %railcnt + 1
    set %rail_label_ . %railcnt
    set %railfile_ . %railcnt C:\Tok_Makoto.txt
    call %railsubs TM_LoadRail %railfile_ . %railcnt
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    set %railcnt %railcnt + 1
    set %rail_label_ . %railcnt
    set %railfile_ . %railcnt C:\Tok_Homare.txt
    call %railsubs TM_LoadRail %railfile_ . %railcnt
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
  }
  if %MakeMSL = 1
  {

    set %railfile C:\Luna_MSL7.txt
    call %railsubs TM_LoadRail %railfile
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    set %railfile C:\MSL8a.txt
    call %railsubs TM_LoadRail %railfile
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    set %railfile C:\MSL8b.txt
    call %railsubs TM_LoadRail %railfile
    if #RESULT = #TRUE
    {
      display ok Rail file not found
      stop
    }
    if %RR = N/A
    {
      set %railfile C:\MSL8c.txt
      call %railsubs TM_LoadRail %railfile
      if #RESULT = #TRUE
      {
        display ok Rail file not found
        stop
      }
    }
  }
wait %LLwait
if %railcnt = 0
{
 display ok You haven't selected any facet(s) to search in. Please select the facet(s) by going to the "User Config"$
 +at the top of this script, and change any facet you wish to seach in, to a "#True" statement.$Stopping Script.
 Stop
}
return

They all load just fine, except when it get to the last one

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #55 on: June 21, 2009, 10:56:55 AM »
0
Well, like I said, put a small pause in between your rail loads.  After each:

Code: [Select]
call %railsubs TM_LoadRail %railfile_ . %railcnt

Just put a "wait 10".  You have to give the rail engine enough time for its state machine to process the last load and display it.  Sometimes it works, but sometimes it doesn't.  With the wait, it should work better.  The wait has to come from the calling script also to allow the rail engine to do it's thing.  It should make the display of the rails loaded more consistant.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline kreterplayer

  • Newbie
  • *
  • Posts: 6
  • Activity:
    0%
  • Reputation Power: 0
  • kreterplayer has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #56 on: July 16, 2009, 07:38:48 PM »
0
i been at this for a good twenty minutes, trying to figure out how to download this, well.. now really now, but where to... can you point this out for me? im sure there is a link or something i just cannot see it for anything

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #57 on: July 16, 2009, 07:56:01 PM »
0
Now that you are unrestricted, just look at the first post; it'll be attached to the bottom.  There's a few files, engine developer, and PDF help file.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline kreterplayer

  • Newbie
  • *
  • Posts: 6
  • Activity:
    0%
  • Reputation Power: 0
  • kreterplayer has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: TrailMyx's Master Rail Engine/Developer
« Reply #58 on: July 16, 2009, 08:12:09 PM »
0


I dont see the developer, i got the engine and the help. BTW amazing job on the help pdf, never have i seen such detail in instructions

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Master Rail Engine/Developer
« Reply #59 on: July 16, 2009, 08:31:48 PM »
0
Thanks!  It's a bit out of date, but it'll get you started.

The rail developer is tool_rail55c.txt
Please read the ScriptUO site RULES
Come play RIFT with me!