Author Topic: How to Mass Edit and Data Mine your Module  (Read 1437 times)

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #15 on: February 12, 2012, 12:18:37 pm »


               In a word....


Woe!
               
               

               
            

Legacy_Guest_Chrysoli_*

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #16 on: May 10, 2012, 05:23:59 pm »


               Very useful - thanks!
               
               

               
            

Legacy_Jez_fr

  • Sr. Member
  • ****
  • Posts: 460
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #17 on: May 23, 2012, 08:51:53 am »


               omg, the number of children I could have raised instead of editing things by hand if I had that a few years ago... *cries*

Thanks a lot for your time Funky :]
               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #18 on: September 12, 2012, 10:32:05 pm »


               Woah! When I learned python, I thought I may have done my last bit of Perl coding. But, I have to admit that the things one can do with Moneo and Letoscript are awesome. Thank you so much for making such a clear tutorial, FunkySwerve.

BTW, does Letoscript support having a hash of lists? I think I have just mangled the syntax, but I am not getting what I expected. For example,

@h['reptilian']=('lizardman','lizardman shaman','kobold','kobold commando');
@h['undead']=('zombie','skeleton','skeleton warrior','ghoul');
print "$_, " for ($h['undead']);
just prints "ghoul, " whereas I was expecting "zombie, skeleton, skeleton warrior, ghoul, ". I'm probably doing something silly, but it's been a while since I've done things this way.
               
               

               


                     Modifié par MrZork, 12 septembre 2012 - 09:33 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #19 on: December 17, 2012, 03:15:57 am »


               Sorry, MrZork, I have no idea if it supports hashes at all. Dragonsong did some great and surprising stuff with it, but most of the above was learned via trial and error, or taught to me by acaos, after his own trial and error.

Funky
               
               

               
            

Legacy_dunahan_schwerterkueste_de

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #20 on: March 27, 2014, 05:44:40 pm »


               

A little update for those who want it. I digged a littlebit in the previous socials and found this link for Moneo RC 3 +  Sources.


I haven't had the chance to give it a try, 'cause I'm new to it, but I will '<img'>


 


http://sourceforge.n...cts/leto/files/



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #21 on: March 30, 2014, 12:16:32 am »


               Is the Letoscript (Unicorn) syntax documented anywhere?


I found this Letoscript functions document, which looks useful, but no syntax primer...
               
               

               
            

Legacy_dunahan_schwerterkueste_de

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #22 on: March 30, 2014, 10:51:15 am »


               

With the linked RC3 is a helpsys included. It can be reached from the shell with Ctrl+], hitting enter and typing help  '<img'> For German Users it's a tricky thing to get this system. I've got around with the tool "Bildschirmtastatur" and the "Layout" changed to English '<img'>


Some of these functions seem to be there, but I haven't read all of the helpsys. Seems, that not all functions are fully described...


 


The gff.add func listened in there looks like that:



Moneo# desc. gff.add
---------------------------------------------
gff.add
---------------------------------------------
gff.add $name, $value = undef, $type = undef;
  /copyfrom, $lang, $setifexists

Creates a new Field in an open GFF.

In your mentioned link it looks like that:


 


gff.add is a list operator


$name,

$value = 0,

$type = undef;

/copyfrom,

$lang = 0,

$setifexists = 0


Create a new Field. Quite possibly the single most useful function in LetoScript. (Setting the value of an existing Field isn't technically a funciton.) You can use this function to give a PC a new Feat, level, or even an item in his/her inventory (using the very nifty /copyfrom argument).


 


But I found something nice mentioned. The helpsys could be extended. In the download should be another tool that helps with this.



               
               

               


                     Modifié par dunahan@schwerterkueste.de, 30 mars 2014 - 10:19 .
                     
                  


            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #23 on: March 31, 2014, 04:04:19 am »


               

With the linked RC3 is a helpsys included. It can be reached from the shell with Ctrl+], hitting enter and typing help...

Thanks for this. I found the document LetoScriptHelp.xml in the Moneo folder, but of course it's almost impossible to read as a stand-alone document. Which shell do you mean? Is it necessary to reinstall Moneo?
               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #24 on: March 31, 2014, 04:19:08 am »


               Some very minor observations on FunkySwerve's excellent tutorial:
  • The newline symbol is \n, not \\n
  • Field names only need to be enclosed in delimiters {' '} if they contain blanks, so Placeable List needs delimiters, but Tile_List doesn't
  • else if doesn't work; it has to be elsif or else {if ...}

               
               

               
            

Legacy_dunahan_schwerterkueste_de

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #25 on: March 31, 2014, 10:30:34 am »


               When you use cmd, or the command console, first start Moneo with 'moneo'. Followed by ctrl+] and at least write help.

The xml file is used as a 'database' which everyone can edit/add. These corrections will be seen in the cmd/moneo-helpsys.

As far as I saw, only the RC3 supports it.


If you have a version like 4.0.2.24 (linked in Funkys first post) or earlier, you should download the RC3 I linked before. I found that file in a thread in this forum and thought it would be good to see it here too.

My, or better this version is 4.0.6.27rc3... I'm working on a sort of lexicon of it. Currently I am copying all of it's info's into this doc. It contains even Funkys thread. So I got a doc likely the nwscript lexicon... But it's not that usable now '<img'>
               
               

               
            

Legacy_dunahan_schwerterkueste_de

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #26 on: March 31, 2014, 10:41:53 am »


               Something from the 27rc3:

What's new in build 27


Fixed:


Many syntax-level problems were resolved, especially for variables. A crash bug in for-loops over ERF resources was finally resolved.


Added:


Loads of additions: .names attribute, plus (et), minus, plussp (y), fileinfo, forcedirectories, system (execute shell commands), and Moneo's command mode (including the helpsys you're reading now). gff.add can now add Structs, and the syntax /^/ (parent of context) supplements /~/ (child of context).


Changed:


Warnings are now enabled by default. The bind operator =~ was changed to literal in, and completely deprecates %erf['resource'] syntax. + is much more strict about numeric addition. bic.vault option FullPaths renamed to NoFullPaths. filesys and system.system disabled by default.


               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #27 on: March 31, 2014, 04:42:46 pm »


               Thanks. I installed RC3, but regressed to Funky's tried-and-trusted 4.0.2.24.

I found the DOS help no easier to navigate than the raw XML. Also, RC3 clutters the working folder; maybe I should add Moneo to the DOS path, but my motto is "if it ain't bust, don't fix it".

Look forward to your user-friendly documentation, though!
               
               

               
            

Legacy_dunahan_schwerterkueste_de

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #28 on: March 31, 2014, 06:17:27 pm »


               

I wouldn't add it to the dos path, but you reduce the amount of files from RC3 to the exe itself. Meanwhile I'm running both versions under the same folder, only renamed '<img'>


 


The document seem to be in a good shape. For the first version, I have to do some cosmetic thingies, before I'll link it here.



               
               

               
            

Legacy_dunahan_schwerterkueste_de

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
How to Mass Edit and Data Mine your Module
« Reply #29 on: April 01, 2014, 01:11:20 pm »


               Okay, some things I've noticed trying the RC3. If you call a for-loop for example for every *.git file in a opened module, the command/syntax for the loop has changed.


Funkys letoscripts do it this way:
for (%mod ['*.git]) {

But with the new version it must be:
for ('*.git' in %mod) {

Seems to me, that the previous version got tons of changes, I can't outguess... Need some more digging '<img'>