Integrated Static Tool

Archive of the older Feature Request Forum Posts

Moderator: POL Developer

Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Integrated Static Tool

Post by Pierce » Mon Apr 03, 2006 3:44 am

I'm just working on a custom map2 getting a little insane while doing so :wink: I think most of us know that building maps and statics need a lot of patience and a lot of knowledge of several tools (UO Landscaper, World Forge, UOSIR, UOSP .........). Imho there is no tool to create or edit statics2.mul and staidx2.mul except for random creation with UO Landscaper or install RunUO and use the freeze function there (just read that). This is way to complicated i think.

Cause 96 has ListStatics* commands i thought about an easy to use a feature at least for statics to build, edit or delete staticsN.mul and staidxN.mul files. The file formats for these files are well known and i thought about writing a pearl script but if pol can do that for all map statics it would be a lot easier and we all can easily do that just using pol.

I think about commands like:

AddItemsToStaticsInBox(( x1,y1,z1, x2,y2,z2, flags := 0, realm := _DEFAULT_REALM );

AddItemsToStaticsOfTypeInBox(( x1,y1,z1, x2,y2,z2, objtype, flags := 0, realm := _DEFAULT_REALM );

DeleteStaticItemsInBox(( x1,y1,z1, x2,y2,z2, realm := _DEFAULT_REALM );

DeleteStaticItemsOfTypeInBox(( x1,y1,z1, x2,y2,z2, objtype, realm := _DEFAULT_REALM );

Flags could be:
const IGNORE_Z := ??;
const IGNORE_DOORS := ??;
const IGNORE_INVIS_ITEMS := ??;

Just to mention the most important operations.
Pol could rebuild the staidxN.mul and staticsN.mul then and save it e.g. as newstaidxN.mul and newstaticsN.mul into the mul directory.

If that is possible, it could save a lot of time in world building. You only need to uoconvert the new files and restart the server to check your work.

nevalon
Neophyte Poster
Posts: 39
Joined: Tue Mar 07, 2006 7:28 am
Location: Poland

Post by nevalon » Mon Apr 03, 2006 7:01 am

IMO good idea, it'll help a lot in world building.

User avatar
MontuZ
Forum Regular
Posts: 338
Joined: Fri Feb 10, 2006 8:08 am
Location: Myrtle Beach, South Carolina

Post by MontuZ » Mon Apr 03, 2006 7:49 am

Some way of burning items into statics VIA pol would be absolutely wonderful.

nevalon
Neophyte Poster
Posts: 39
Joined: Tue Mar 07, 2006 7:28 am
Location: Poland

Post by nevalon » Mon Apr 03, 2006 9:50 am

Hmm what about automated uoconvert (but not all file, only edited part, so core will edit both mul and POL map .dat files)? I think it'll be possible.
And what about "unloading" them without restarting server? Is it possible? I know that client restart is required (mul files), but what about server?

User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am
Location: Illinois, USA

Post by Tritan » Tue Apr 04, 2006 9:34 am

With Windows, if the file is in use changes can not be saved to them. That is why the restart would be required. At least that is what I have heard in the past.

nevalon
Neophyte Poster
Posts: 39
Joined: Tue Mar 07, 2006 7:28 am
Location: Poland

Post by nevalon » Tue Apr 04, 2006 10:35 am

Uh, you're right, I forgot this :D

Marilla

Post by Marilla » Wed Apr 05, 2006 7:14 am

Tritan wrote:With Windows, if the file is in use changes can not be saved to them. That is why the restart would be required. At least that is what I have heard in the past.
That's actually not technically true - a program can choose what sort of lock to request on a file, and the operating system can grant or not grant that type of lock.

With that said, it is typical when a program must have constant access to a file which it expects never to change, that it requests a lock that prevents writing to the file. This is usually because changes in some part of the file could cause program errors due to the program making assumptions about what else it read from the file before - which may have changed in the interim.

I haven't tested it myself, but my understanding is that POL096 doesn't lock -ANY- of the mul files at all, since it's actually not reading them at all.

But the configs that it produces, which it has to read from time to time - POL typically does not lock them at all ever, except for the momentary locks when it actually is writing to them. This demonstrates what I said above: It's up to the program to lock or not lock, depending on how it uses the file in question. (of course, it's also likely POL doesn't keep those files open, but just opens them right when it needs them - but I still don't believe it locks the files at all while reading, as you would expect errors if you were editing a config file at the same time POL read from it, but I've never seen such an error)


ALL of that said... I think I would have to vote against including such features into POL, for two reasons:

One: The tools to do this are already out there, so why waste POL dev time (which is already so extremely limited) working on reinventing the wheel?

Two: I really don't want my production server clogged up with code for this sort of thing. Even if the above objection were made moot by a sudden influx of more dev team time than needed to accomplish the more important things that need to be done for POL, I would still object to this unless it were possible to configure POL not even to load the code which does this... as a dynamically loaded module, for example.

Matrix
Neophyte Poster
Posts: 32
Joined: Fri Feb 03, 2006 9:13 am
Location: Canada, Quebec

Post by Matrix » Wed Apr 05, 2006 3:14 pm

Stafflicker...

User avatar
MontuZ
Forum Regular
Posts: 338
Joined: Fri Feb 10, 2006 8:08 am
Location: Myrtle Beach, South Carolina

Post by MontuZ » Wed Apr 05, 2006 5:57 pm

Marilla I totally understand you'd rather have the devs bust out all the bugs. But this is a Feature suggestion. It doesn't really help pol, but it helps the users. That's what Features do. Atleast from my point of view, which to you is apperently very wrong. :D

What you're basically saying is that you'd rather; cmd<coords/target> the item(s) you want static into a cfg, copy/paste the cfg, load up a program, burn the statics, etc.

Sphere/RunUO(One of the two) has it(I think) and no this isn't Sphere/RunUO. But you have to admit, it's a nice Feature for an emulator. And knowing you, you probably will still object to it/never agree to it even if we had the developers.

That's all I'm going to say, Anti-Feature. :) Rawr.

Marilla

Post by Marilla » Thu Apr 06, 2006 4:22 am

Unreal wrote:Marilla I totally understand you'd rather have the devs bust out all the bugs. But this is a Feature suggestion. It doesn't really help pol
Thank you for making my point for me.

Matrix
Neophyte Poster
Posts: 32
Joined: Fri Feb 03, 2006 9:13 am
Location: Canada, Quebec

Post by Matrix » Fri Apr 07, 2006 9:56 am

I know a song... In it, you can hear... Marilla Marillaaaaa.... (the song continu but I don't know the words...lol..) Anyway, this post is absolutely useless...

Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce » Sat Apr 08, 2006 3:50 pm

I thought i made a feature suggestion. I don't wanted to start a personal war. It seems some of you want?. I suggest this, cause it seems only RunUO has a solution for that. I had to install this server now to solve that. I have to run through new commands for me. Nevertheless i think it will be a good idea for Pol, cause People should choose Pol for such a reason(feature). Maybe i am wrong.

Yukiko
Distro Developer
Posts: 2728
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko » Sun Apr 09, 2006 1:00 pm

I agree Pierce. POL needs tools like the ones being developed for RunUO. It seems to be defeating the purpose if we need to install a RunUO server just to be able to do map creation and editing in a userfriendly environment.

Now understand I have yet to even try one of those utilities developed for RunUO so they may not be as user friendly as I assume them to be. But to hear the propoganda from those developing them they sure sound like they are. Regardless of what is being done for/with other emulators, it would be nice to have tools like that for us.

I would even be willing to pay for such a program as long as the price was reasonable, say $20.00 to $30.00 US for a decent map editing and static editing program.

melanius
Neophyte Poster
Posts: 39
Joined: Sat Jan 28, 2006 12:39 pm
Location: Greece
Contact:

Post by melanius » Sun Apr 09, 2006 4:37 pm

Indeed it would be nice to have such a feature. Though I'd prefer it to be a simple tool that does just that, and not integrate that kind of code into POL's core base.

Maybe a small just-do-this tool would be more handy/appropriate.

Yukiko
Distro Developer
Posts: 2728
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko » Sun Apr 09, 2006 9:38 pm

Oh yes Melanius. I am sorry. I didn't mean to suggest that it should be integrated into the POL core at all.

I guess I should have stated it more clearly.

I meant to say that it would be nice to have an outside tool that would do what we need and be able to work in the same way Dundee's Other Hand does. It would be nice to be able to be logged into POL and while standing in a certain area be able to either add or remove areas from the map or statics simply by having the program "see" where we are in game. I am pretty sure that any map/statics mods would have to be done on copies of the map rather than the one being used. I am not sure if what I am thinking of is even possible for map editing. Any program that would allow creation of the map in realtime would be nice and that wouldn't have to be attached to POL in any way.

I wish I knew more about the grapjics end of programming. I never got into that much.

Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce » Tue Jun 13, 2006 11:55 am

melanius wrote: Indeed it would be nice to have such a feature. Though I'd prefer it to be a simple tool that does just that, and not integrate that kind of code into POL's core base.

Maybe a small just-do-this tool would be more handy/appropriate.
A simple tool like uoconvert would also be great. I suggest that as pol commands cause you could ask the gamemasters building around. And if they are ready you use these commands to build the new statics and pol will delete the found items to build a new static file from the items.txt.
The possibility of coordination in world building on pol would be better.
I surely don't now if this is much code to swell the core. But these functions won't be called often (i think) to cause lag on a live shard.

User avatar
itec
Novice Poster
Posts: 42
Joined: Thu Feb 09, 2006 11:48 pm
Location: Finland

Post by itec » Fri Jun 16, 2006 11:36 am

If we could have only one new feature for 97, I would definately give my voice for this one. The new core is very stable (not a single crash after RC3 was released, absolutely great job!), so it would be good timing to try something new.

Currently updating statics with pol and external tools contains too much simplistic work that should be handled automaticly. Desroying one or two items in statics is plainly said painful operation. Only the server can give the best support for statics editing, especially when there are multiple builders.

Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce » Tue Aug 22, 2006 12:57 pm

Is there perhaps someone who played around with the RunUO type of files? I installed that server and played around with statics on the ilshenar map. It's very easy to change the statics on RunUO on every map. I can realtime delete or add statics there. The .mul is changed immediatly.
The only function i like on RunUO. So i tried to take a look if i can write a converter from item.txt to the RunUO type of handling of items. But that are 3 files, that are not purely text: items.bin, items.idx,items.tbd.
So it's not the easy way to convert. Does anyone else also take a look into this already?

Repsak
Master Poster
Posts: 91
Joined: Sun Feb 05, 2006 2:00 am
Location: Denmark

Post by Repsak » Tue Aug 22, 2006 2:03 pm

This is very high on my wish list, for the next POL release.

Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce » Sat Aug 26, 2006 12:46 pm

Shame on me, i forget the language POL is written. Was it C++?
If so, it could be a simple thing if one takes a look into the statics.cs command of runuo.

The last three days i played around with runuo a little bit, without any knowledge of c++. The only thing that was interesting for me was the extremly fast method to change the static files cause it tooks too much time to use uosir, uosp or anything else ... And they don't work on maps like ilshenar, malas ...

So i tried too make a runuo 1.0 command that reads the 96/97 items.txt of Pol. After biting 2 days in my keyboard cause of no real idea how C++ works i managed the command on day 3. So far a test command.
I coded it so we could read in the items.txt this way:

command x1 y1 x2 y2 mapid

The command will read every item within these ranges on the choosen map to runuo. I did a test with a 23 MB items.txt without creating items. It took about 2-3 min. to go through that file size on runuo. Perhaps it can be faster, i am new to c++ as i said :D

The creating also works. I test it with a small range with 10 test items.
I will do some further test with some structures i like to place on the ilshenar map and therefor i tried this in first place.

If these tests are successful, i will post this command here.

Nevertheless i hope this will be a feature of POL, cause i hate to use 20 different programs and copy around data to reach my goal :wink:

Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am
Location: Italy
Contact:

Post by Lagoon » Tue Aug 29, 2006 6:15 am

My vote goes for a "simple" single function

ItemToStatics(itemref);

which copies the item to the right statics file according to the map it belongs to.
No need to delete the dynamic item, it can be done with another instruction
No need to add another command to delete in an area, it can be done in scripts
Any other login can be added in script, one single command which just copies 1 item to statics would be easy and powerful
there also is no need to autorun uoconvert and update the at runtime the server data about statics movement validation and such, it can be done turning the server off and doing it manually running uoconvert by command line
Having the ability to code a script which converts to statics the buildings but leaves the doors in dynamic would be great, and you can think of a lot of other examples where this could be very usefull.

Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce » Tue Aug 29, 2006 5:10 pm

there also is no need to autorun uoconvert and update the at runtime the server data about statics movement validation
Are you sure?
If the statics on whatever Map is changed, you need to run uoconvert again.

Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am
Location: Italy
Contact:

Post by Lagoon » Wed Aug 30, 2006 1:25 am

Of course, you have to
- shutdown the server
- run uoconvert
- give new statics to clients
- restart the server

What I meant is that, imho, there's no need for a complex modification to the server in order to add a StaticsConvert() function which lets us runuoconvert by scripts without having to shutdown and restart the server, because I think it would be a complex modification for the devs and not as useful as the ItemToStatics(itemref) itself. Do you agree?

Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce » Thu Aug 31, 2006 3:17 pm

Lagoon wrote:Do you agree?
Hard to say if i agree to that. I convert my items to RunUo and freeze it there to the .mul files. My wish stays as i stated in my first post in this topic to save this in my opinion useless export to runuo. And therefor force their only advantage over Pol.

Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am
Location: Italy
Contact:

Post by Lagoon » Fri Sep 01, 2006 1:58 am

I use a RunUO server to build my towns for the same reason
And also because noone ever coded (it's a cat who bites its tail) a tool like UO Architect for POL

Locked