RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

html generation from mob *.cs scripts

zardoz

Sorceror
Many thanks for providing the updates. There is one further suggestion I would offer. When the mulext.exe file is called from within perl, the command line you generate is not capable of handling paths with embedded spaces. I suggest that all the paths used in the execution line be enclosed in double quotes. This will allow your utility to be used from anywhere and using any pathname for the various files.

Change all occurances of

$prgout = `$mulextpath $uopath $artfile $woffset $wout`;

to

$prgout = `"$mulextpath" "$uopath" $artfile $woffset "$wout"`;
 

x-ray

Wanderer
Change all occurances of

$prgout = `$mulextpath $uopath $artfile $woffset $wout`;

to

$prgout = `"$mulextpath" "$uopath" $artfile $woffset "$wout"`;

Thanks, ill test this and include to the next release.
 

Pyro-Tech

Knight
x-ray said:
if you/or installer set path to perl in the environment variables just type from the folder where are you extract csmob2html:

perl csmob2html.pl

and hit enter, or supply full path to perl:

c:\perlfolder\bin\perl csmob2html.pl

But before running the script make sure you checked and edit config.cfg

i don't have an environment. Im trying to use the command prompt, which i guess is the environment, but i dunno what your talking about. I got it to pint to the folder i have the csmob2html.pl file at...but when i try running it:

Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\Monster HTML Generation>perl csmob2html.pl
'perl' is not recognized as an internal or external command,
operable program or batch file.

D:\Monster HTML Generation>

so....i dunno what to do....i am very ignorant as to this perl stuff
 

x-ray

Wanderer
Pyro-Tech said:
i don't have an environment. Im trying to use the command prompt, which i guess is the environment, but i dunno what your talking about. I got it to pint to the folder i have the csmob2html.pl file at...but when i try running it:

Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\Monster HTML Generation>perl csmob2html.pl
'perl' is not recognized as an internal or external command,
operable program or batch file.

D:\Monster HTML Generation>

so....i dunno what to do....i am very ignorant as to this perl stuff

ok, forget about PATH environment variable :)
You need to supply FULL path to perl, lets see - if u install perl to c:/perl you must type something like this:

D:\Monster HTML Generation>c:\perl\bin\perl csmob2html.pl

Thats all...
 

KillerBeeZ

Knight
x-ray said:
ok, forget about PATH environment variable :)
You need to supply FULL path to perl, lets see - if u install perl to c:/perl you must type something like this:

D:\Monster HTML Generation>c:\perl\bin\perl csmob2html.pl

Thats all...

just to add something.... be sure you have perl installed
 

x-ray

Wanderer
LordHogFred said:
Can someone please tell me how I am exactly supposed to use the image extractor thingy ?

Thanks,

If you talking about usage of only mulext just run it without parameters - it tell you small help.
For all instruction on csmob2html read the readme.txt in the distro archive.
 

Pyro-Tech

Knight
ok thanks. that got it working for me YAY!!!

but it didn't extract any picture data....im just getting a red x

ill try looking around and figureing it out....


and what is the easiest way to edit the resulting files....i need to use a background image, and change the colors.....but im sure i can find the hex colors (i think that is what they're called)

thanks again for clearing this up
 

x-ray

Wanderer
Pyro-Tech said:
ok thanks. that got it working for me YAY!!!

but it didn't extract any picture data....im just getting a red x

ill try looking around and figureing it out....


and what is the easiest way to edit the resulting files....i need to use a background image, and change the colors.....but im sure i can find the hex colors (i think that is what they're called)

thanks again for clearing this up

if no pictures are generated check path to Ultima Online Client in config.cfg, it MUST point to your ultima online directory. Also, i dont remember if my program work with the path contains spaces. It should, but you can temporary move your uo client to c:\uo for example, put this path in config.cfg and run script again.

About background of the image - at this point the background is only solid white color. Also for image generation i've used smplest bmp format.

BTW, mulext takes body values and offsets from the body.cfg what i merged from Alazane xml file and UOX manual as i mentioned above. Some of body values are missied (AoS monsters), some is may be wrong. Anyway, if you find mistake or additional information in body.cfg values and offsets please share them here.

Also, can anybody explain to me in detail (best if you make this in formulas) how hues are applied to the image. I read old Alazane specs, but dont understand this moment :(
 

LordHogFred

Knight
Ok I'm really confused now. I'm looking at the readme.txt and it says I need to compile the mulext.exe with *nix ?????

What exactly do I need to do ?
 

x-ray

Wanderer
LordHogFred said:
Ok I'm really confused now. I'm looking at the readme.txt and it says I need to compile the mulext.exe with *nix ?????

What exactly do I need to do ?

Lets check readme.txt together:

Mulext was compiled by MSVC but you can easly compile it under *nix using
latest version of gcc."

This is from "Notes on mulext". You don't need to compile mulext under unix (you can, but if you under windows you dont need to). This is just a note what u can do this.

All you need to do, just follow the instructions in usage:
- Rename config.eng to config.cfg
- Check the english spelling and grammer in text strings in config.cfg,
sorry :(
- Edit config.cfg: change input path to your root folder of the mob
scripts (c:/runuo/scripts/mobiles/monsters/ for example)
- Edit config.cfg: change output path to the existing temporary folder
- Edit config.cfg: change uopath path to the path to your ultima online
folder. If you dont need pics generation just comment this line (using #).
I've only tested mulext on uo2d client installation !
- Run csmob2html.pl
- Edit style.css and copy it to the output folder
- index.html will be the root of all pages :)
 

LordHogFred

Knight
ok I've done that but when I try to run mulext.exe it just exits straight away and does nothing that I can see. :confused:

All I get is:

Code:
*** Mul Extractor v.1.0beta
*** Usage: mulext [path to uo][animation mul number][id][output filename]<hue>
*** Feedback: hm aka x-ray (jm99[at]mail33.com)
*** WARNING ! HUE parameter ignored in this version !
 

KillerBeeZ

Knight
LordHogFred said:
ok I've done that but when I try to run mulext.exe it just exits straight away and does nothing that I can see. :confused:

All I get is:

Code:
*** Mul Extractor v.1.0beta
*** Usage: mulext [path to uo][animation mul number][id][output filename]<hue>
*** Feedback: hm aka x-ray (jm99[at]mail33.com)
*** WARNING ! HUE parameter ignored in this version !

Start> Run> type "cmd" on XP, NT 2000 or such, or on 98 go to the programs and open a Command Prompt, then drag the exe to the window, hit enter.

OR

you may have the directory set wrong
 

KillerBeeZ

Knight
LordHogFred said:
The text I posted is what I get if I run mulext.exe from the command prompt :confused:

just d/led it and tried it, and well, I seem to have gotten the same error you did

a question though about the cfg

- Edit config.cfg: change input path to your root folder of the mob
scripts (c:/runuo/scripts/mobiles/monsters/ for example)

files and folders on a local windows machine use \ not /

was this intended?

and I actually tried it both ways

I imagine its just something we are doing wrong, maybe something thats not in the readme?
 

x-ray

Wanderer
LordHogFred said:
ok I've done that but when I try to run mulext.exe it just exits straight away and does nothing that I can see. :confused:

All I get is:

Code:
*** Mul Extractor v.1.0beta
*** Usage: mulext [path to uo][animation mul number][id][output filename]<hue>
*** Feedback: hm aka x-ray (jm99[at]mail33.com)
*** WARNING ! HUE parameter ignored in this version !

Depends what do you want at all. If you want web pages prepared from your .cs files you need to start csmob2html (using perl interpreter) but not mulext.
 

x-ray

Wanderer
KillerBeeZ said:
just d/led it and tried it, and well, I seem to have gotten the same error you did

a question though about the cfg

- Edit config.cfg: change input path to your root folder of the mob
scripts (c:/runuo/scripts/mobiles/monsters/ for example)

files and folders on a local windows machine use \ not /

was this intended?

and I actually tried it both ways

I imagine its just something we are doing wrong, maybe something thats not in the readme?

This is possible the behavior zardoz point me in the previous page of this topic. Possible the paths you try to work with includes spaces ? Anyway i will check this.
 

Greystar

Wanderer
KillerBeeZ said:
just d/led it and tried it, and well, I seem to have gotten the same error you did

a question though about the cfg

- Edit config.cfg: change input path to your root folder of the mob
scripts (c:/runuo/scripts/mobiles/monsters/ for example)

files and folders on a local windows machine use \ not /

was this intended?

and I actually tried it both ways

I imagine its just something we are doing wrong, maybe something thats not in the readme?

I added "" around the line for the path variable and it fixxed it. Got the pictures... btw thanks for writing this... Its something RunUO needed atleast in my humble opinion.
 

x-ray

Wanderer
Version 0.55 reposted.
* Fixed bug with the embedded spaces in the path parameters to mulext (Thanks to zardoz !)
* Fixed error with name caching of already extracted images
* Now csmob2html correctly (i hope :)) extract several pics if several mobs class defined in source .cs script
 

KillerBeeZ

Knight
I'm still getting an error .....

this error

Code:
C:\Documents and Settings\KillerBeeZ>"C:\Documents and Settings\KillerBeeZ\Deskt
op\HTML temp\mulext.exe"
*** Mul Extractor v.1.0beta
*** Usage: mulext [path to uo][animation mul number][id][output filename]<hue>
*** Feedback: jm aka x-ray (jm99[at]mail333.com)
*** WARNING ! HUE parameter ignored in this version !

C:\Documents and Settings\KillerBeeZ>

this is the cfg

Code:
# path to ultima online client (i test this only on 2d client installation)
# comment this line if you dont want generate pictures
# ïóòü ê êëèåÃ*òó óëüòèìû îÃ*ëÃ*éÃ* (òåñòèðîâÃ*ëîñü òîëüêî Ã*Ã* 2ä êëèåÃ*òå)
# çÃ*êîììåÃ*òèðóéòå ýòó ñòðîêó åñëè âÃ*ì Ã*Ã¥ Ã*óæÃ*û êÃ*ðòèÃ*êè

uopath = "C:\TEMP\UO"

# path to output / âûõîäÃ*îé êÃ*òÃ*ëîã

output = "C:\TEMP\html"

# one line long path to *.cs scripts / îäÃ*îé ñòðîêîé ïóòè ê ñêðèïòÃ*ì ñóùåñòâ
# for example: / Ã*Ã*ïðèìåð:
# input = c:/runuo/scripts/test/;c:/runuo/scripts/custom/

input = "C:\TEMP\Scripts"

# index file name / èìÿ èÃ*äåêñÃ*îãî ôÃ*éëÃ*

index = index.shtml

# base classes / áÃ*çîâûå êëÃ*ññû
# for example: / Ã*Ã*ïðèìåð:
# baseclasses = BaseCreature;BaseYouWish

baseclasses = BaseCreature

# text labels / ëåéáëû

PICLABEL = Picture
STRLABEL = Str
DEXLABEL = Dex
INTLABEL = Int
DMGLABEL = Damage
FAMELABEL = Fame
KARMALABEL = Karma
ADAMAGELABEL = Attack
RESISTLABEL = Resistance
SKILLLABEL = Skills
MINTAMELABEL = Min. to tame
SLOTSLABEL = Control Slots
ARMORLABEL = Armor
ATTACKDAMAGE = Attack
RESISTANCE = Resistance
SKILLS = Skills
PHYSICAL = Physical
FIRE = Fire
COLD = Cold
POISON = Poison
ENERGY = Energy
INFO = This page is autogenerated by <a href="http://www.runuo.com/forum/showthread.php?t=38392">csmob2html</a>


is it something I'm doing?
 
Top