Aller au contenu

Photo

How to Mass Edit and Data Mine your Module


  • Veuillez vous connecter pour répondre
44 réponses à ce sujet

#26
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages
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 :(
  • Rolo Kipp aime ceci

#27
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages
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.



#28
Proleric

Proleric
  • Members
  • 2 343 messages
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!

#29
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages

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 ;)

 

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.



#30
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages
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 :D

#31
Proleric

Proleric
  • Members
  • 2 343 messages
I verified that behaviour. Existing scripts fail with this message:

[Warning] Deprecated use of %ERF['resource']; use instead 'resource' in %ERF at c_add_var.ls line 9 pos 6.

So, I'm even more persuaded to stay on the old release. All the same, it would be really helpful if you could publish the documentation in a legible format, with the caveat that some things have changed. It's full of helpful gems!

As one illustration, in Funky's example #1, there's no way of telling which area each placeable count is for, because the area name isn't in any .git file field. However, using the new documentation to discover the "silver bullet" variable $_,

for (%mod['*.git']) 
  {
    $area = $_;
    $count = 0;
    for (/{'Placeable List'}) {$count++;}
    print $area, $count, "\\n";
}


#32
MrZork

MrZork
  • Members
  • 938 messages

It is also possible to give the loop variable an explicit name. The example below does that in both loops.

 

FWIW, the example is a placeable counter, as above, but also prints the more human-readable name of each area, along with its resref and placeable count. To do that, the first loop populates a hash with the area names, using the resrefs as keys, then the second loop grabs the name. Both loops take advantage of the fact that the resrefs are the ARE and GIT filenames stripped of their extensions, something ls scripts can also take advantage of when looping through creatures, items, etc.

@AreaNames = ();
for $AreaARE (%mod['*.are']) {
    $AreaNames[substr($AreaARE,0,-4)] = /Name;
    }

for $AreaGIT (%mod['*.git']) 
    {
    $AreaRR = substr($AreaGIT,0,-4);
    $AreaName = $AreaNames[$AreaRR];
    $count = 0;
    for (/{'Placeable List'}) {$count++;}
    print "$AreaName [$AreaRR] has $count placeables\n";
    }

  • Proleric aime ceci

#33
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages

Sry, for that delay :) Got the doc ready enough for the first public release. Hope it will help, even a littlebit ;)

 

Here's the link

https://www.dropbox....your Module.pdf

 

The code for the first example of Funky will work, if you do it that way:

Spoiler

MrZork explains the definition of subroutines, as I guess. It's described in the helpsys also in the pdf-doc.


  • Proleric et Rolo Kipp aiment ceci

#34
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages

As you can see in this very early version, I'm trying to build a lexicon like the nwscript-lex ;) got some of the functions of rc3 and some of Funky's/Acaos provided scripts working in the new version of moneo.

*working on these files to get them right* :D



#35
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages

Very cool, and nice work. Watching this thread with interest, though I don't have time to do much experimentation myself, these days. Let me know if there's anything you think should be included in the original posts.

 

Thanks!

Funky


  • dunahan_schwerterkueste_de et Rolo Kipp aiment ceci

#36
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages
*blushes*
Thanks you too! Got 70% of those provided scripts by you and Acaos already working. Now I'm trying to get the doc filled with the info I got of this 'learning by doing' sessions :D
Besides, I'm going to comment those scripts, so that even newbies, like me (got no education on languages to write such scripts, learned only from tests and faults) can read them and have a idea of what they do, or even what help moneo can be!
*going back to this script, that eventually copies a whole area from one map to another map, or I hope so*

#37
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages

Something I found out and would add to the doc in time:

Spoiler
Spoiler
Spoiler
Spoiler

  • Rolo Kipp aime ceci

#38
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages

Sounds good. Do you have a script sample for those functions?

 

Thanks,

Funky


  • dunahan_schwerterkueste_de aime ceci

#39
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages

Got them here, but had to correct some descriptions due newer experiences...

 

addac.ls

Spoiler

 

dumpcritter.ls:

Spoiler

 

dumpdoors.ls:

Spoiler

 

*grumbles 'cause of the formatting of the post due inserting from mobile phone*


  • Rolo Kipp aime ceci

#40
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages

Actually, I get the same formatting issues when I post from my PC. I haven't fussed with trying to work around them yet, as I've been using pastebin. I may do that as well, for these samples. I'll get them added to the followup post as soon as I'm able.

 

Thanks!

Geoff


  • dunahan_schwerterkueste_de aime ceci

#41
Proleric

Proleric
  • Members
  • 2 343 messages
On the subject of formatting on this site, you can use the "spoiler" BBCode to reduce long scripts to a button - that way, folk can browse the thread without having to page through the detail every time.
  • Squatting Monk et dunahan_schwerterkueste_de aiment ceci

#42
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages

Didn't saw this spoiler thingie, so I didn't thought it was active. Now I re-edited the post and put them into spoilers ;)



#43
dunahan_schwerterkueste_de

dunahan_schwerterkueste_de
  • Members
  • 43 messages

Sry, got some serios probs with akamaihd.net ;) Since I did some backups, my work isn't destroyed, but it would take some time to get back to it...



#44
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages

Thanks - I'll try to reformat the original post, when I go back through it, using spoiler tags. Here's to hoping this forum holds on to color codes better than the last one. :P

 

Funky


  • dunahan_schwerterkueste_de aime ceci

#45
Proleric

Proleric
  • Members
  • 2 343 messages

I just discovered how to merge area information from the .are and .git files. I'll cross-post the solution here, for future reference. In this example, we make a list of area placeables from the .git file, but add the area name from the .are file.

 

Spoiler

  • dunahan_schwerterkueste_de aime ceci