Author Topic: Shortcut creator  (Read 1848 times)

Orgonwukh

  • Hydlaa Citizen
  • *
  • Posts: 254
    • View Profile
Shortcut creator
« on: May 17, 2008, 06:56:48 pm »
Stories, poems, songs, all are told best when put into shortcuts previously, to avoid long waiting time.
I usually write stories and songs in an ASCII text file, then later I have to retype it into the shortcuts.
It would be nice if that could be done automatically, because it is difficult to type it directly into the shortcut file, too (I had some bad game crashes, trying that on my own).

Izzabella

  • Hydlaa Citizen
  • *
  • Posts: 442
    • View Profile
    • Outlaws
Re: Shortcut creator
« Reply #1 on: May 17, 2008, 07:41:11 pm »
Hmm just an idea (and this only works for windows users) C:\Documents and Settings\Owner\Application Data\PlaneShift\options\shortcutcommands.xml what if you edited that file? ;) I've not actually tied it so I dunno for sure if it works but in theory open with notepad or something paste your junk in there and tada!



*eidit* Just tested my theory and yes it works! whoo hoo! I am so smart!

and err what I mean by that only works for windows users is that everyone else has to find their own shrotcutcomands.xml file ;P
« Last Edit: May 17, 2008, 07:44:11 pm by Izzabella »

Orgonwukh

  • Hydlaa Citizen
  • *
  • Posts: 254
    • View Profile
Re: Shortcut creator
« Reply #2 on: May 17, 2008, 08:03:45 pm »
Hmm just an idea (and this only works for windows users) C:\Documents and Settings\Owner\Application Data\PlaneShift\options\shortcutcommands.xml what if you edited that file? ;) I've not actually tied it so I dunno for sure if it works but in theory open with notepad or something paste your junk in there and tada!



*eidit* Just tested my theory and yes it works! whoo hoo! I am so smart!

and err what I mean by that only works for windows users is that everyone else has to find their own shrotcutcomands.xml file ;P
I did that, but it only worked for single lines. The new lines did not work and it caused crashes on startup, I could not reproduce. Anyone else having the same problems?

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: Shortcut creator
« Reply #3 on: May 17, 2008, 08:08:10 pm »
Code: [Select]
<shortcut18 name="sample"><![CDATA[
line1
line2
line 3
...
line n-1
line n]]></shortcut18>
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

Socius Rockus

  • Hydlaa Notable
  • *
  • Posts: 548
  • Wibble myself: 17years I was gone, give or take
    • View Profile
Re: Shortcut creator
« Reply #4 on: May 17, 2008, 08:09:32 pm »
Hmm it seems that you must NOT type 'new lines'. perhaps just one Big and long line? Because ingame in the chat window you can't make 'new lines' either  :sorcerer:

Orgonwukh

  • Hydlaa Citizen
  • *
  • Posts: 254
    • View Profile
Re: Shortcut creator
« Reply #5 on: May 17, 2008, 08:22:09 pm »
Hmm, I admit, my request was not very clear.
I am not talking about one or two lines. I have a script consisting of about 300 lines. I think there are not enough shortcut slots to cover that. And typing that into the XML file is the hell of a work.

Socius Rockus

  • Hydlaa Notable
  • *
  • Posts: 548
  • Wibble myself: 17years I was gone, give or take
    • View Profile
Re: Shortcut creator
« Reply #6 on: May 17, 2008, 08:31:59 pm »
Hmm I meant it like this:

Script:
Socus walks.
Socius falls.
everyone laughs.


 would be in xml:
Code: [Select]
Socius walks. Socius falls. everyone laughs.

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Shortcut creator
« Reply #7 on: May 17, 2008, 09:01:43 pm »
Hmm, I admit, my request was not very clear.
I am not talking about one or two lines. I have a script consisting of about 300 lines. I think there are not enough shortcut slots to cover that. And typing that into the XML file is the hell of a work.


The shortcuts i dont think will support one that holds 300 lines, and i dont think anyone would want to read it if all that showed up ingame at one time.

Orgonwukh

  • Hydlaa Citizen
  • *
  • Posts: 254
    • View Profile
Re: Shortcut creator
« Reply #8 on: May 17, 2008, 11:47:35 pm »
Hmm, I admit, my request was not very clear.
I am not talking about one or two lines. I have a script consisting of about 300 lines. I think there are not enough shortcut slots to cover that. And typing that into the XML file is the hell of a work.


The shortcuts i dont think will support one that holds 300 lines, and i dont think anyone would want to read it if all that showed up ingame at one time.

Yup, therefore I'd need about 300 shortcuts, or the maximum number of shortcuts available, but still I'd have to put them in the XML file manually. But from the responses, I recognise, that this is a specific request and seems not to be of any use for a lot of users. So forget it, I'll train my typing instead :P

Prolix

  • Guest
Re: Shortcut creator
« Reply #9 on: May 18, 2008, 04:32:07 am »
Code: [Select]
<shortcut18 name="sample"><![CDATA[
line1
line2
line 3
...
line n-1
line n]]></shortcut18>

I believe this meant put each sentence on a new line. compare this prospecting shortcut
Code: [Select]
<shortcut21 name="prospect"><![CDATA[/dig clay
/dig for gold
/dig for silver
/dig for platinum
/dig for copper
/dig for tin
/dig for lead
/dig for mercury
/dig for iron
/dig for coal
/dig for diamond
/dig for ruby
/dig for emerald
/dig for amethyst
/dig sapphire
/dig for opal
/dig for alexandrite
/dig for smargd
/dig for lumium
/roll 20]]></shortcut21>
if you replace all the /dig commands with /say you could have an arbitrarily long shortcut. I would suggest full sentences but you could play around with it.

Under the moon

  • Forum Addict
  • *
  • Posts: 2335
  • Writer extraordinaire.
    • View Profile
Re: Shortcut creator
« Reply #10 on: May 18, 2008, 05:19:54 am »
What I have done before is write a simple shortcut in the game, then fill in the blanks in the XML. No code mistakes, then. My shortcut would look like this:

Story 1

/say <para1>
 /me <does this>
/say <para2>
 /me <makes the pause>
/say <para3>

Then just go into the XML and replace the <para1> with the right text. I don't know if there is a character limit to the shortcuts that might be causing your error.

Hmm... I wonder. Let me try something.

Edit: To continue. If you indeed need to tell long stories, there is another way to do it without filling up your shortcuts (I have done this for a long time). I was just testing how it works in shortcuts... but it occurred to me that it would be silly to double up and waste your shortcuts just for text. Do this through creative use of the chat filter system.
1- Go into your Chat XML
2- Make 'bad word' shortcuts such as para1 or 1:
3- Fill in the 'good word' with whatever you want, as long as it is text and contains no special characters.
4- save.
5- Go ingame and Turn your outgoing filter on.
6- Type para1 and watch your first paragraph appear to the enjoyment of others. You might want to test them first.

Do that with every new paragraph and you are good to go. It you want to mix in some longer action as well, the above also works in /me. Just type /me action1 (or whatever 'word' you used) to have that text replaced by your own. Do not put a filtered word in your replacement text, or your client will bork.
« Last Edit: May 18, 2008, 06:38:44 am by Under the moon »