.EM FILES
Moderator: POL Developer
-
- Grandmaster Poster
- Posts: 104
- Joined: Fri Feb 03, 2006 6:32 am
- Location: Austria
- Contact:
For a change POL development is going too fast for me.
I am only just at the point of cutting my shard over to 096.
I've been working through replacing all the MoveItemToLocation and MoveCharacterToLocation functions and haven't even started on saving realm parameters in golocs, runebooks, moongates and the 100 other places where it matters. I had no idea how time consuming it all was, let alone adding all the realm parameters to the scripts.
One comment. In 096 functions sometimes you put the realm parameter at the end and sometimes it's the second last parameter. Was there a logic to where the realm parameter was put in the function? eg using MoveObjectToLocation the realm is right BEFORE the movemode.
I am only just at the point of cutting my shard over to 096.
I've been working through replacing all the MoveItemToLocation and MoveCharacterToLocation functions and haven't even started on saving realm parameters in golocs, runebooks, moongates and the 100 other places where it matters. I had no idea how time consuming it all was, let alone adding all the realm parameters to the scripts.
One comment. In 096 functions sometimes you put the realm parameter at the end and sometimes it's the second last parameter. Was there a logic to where the realm parameter was put in the function? eg using MoveObjectToLocation the realm is right BEFORE the movemode.
I think they put the REALM parameter on the end when it was added as an 'optional' parameter to existing functions. This way, current use could still work as-is, without using additional realms, while to move to supporting realms, people just had to add the realm parameter to the functions (yes; easier said than done, but at least it doesn't require changing function signatures, beyond adding)
The functions with the realm in the 'middle', then, are pretty much all completely new functions, as I recall (though I've been wrong before! )
I have to say I think I *might* have preferred they implement the 096 functions in a more consistent way, even if it made upgrading function calls more difficult. I say *might*, because it's easy for me to say that, since they didn't do it that way. hehe... had they done it that way, I might be singing a different tune, now! But by tacking the REALM parameter onto the end, it now requires that previously existing optional parameters must now be specified, and sometimes that's just a little bit of a pain. Not a biggie, but... ehhh!
The functions with the realm in the 'middle', then, are pretty much all completely new functions, as I recall (though I've been wrong before! )
I have to say I think I *might* have preferred they implement the 096 functions in a more consistent way, even if it made upgrading function calls more difficult. I say *might*, because it's easy for me to say that, since they didn't do it that way. hehe... had they done it that way, I might be singing a different tune, now! But by tacking the REALM parameter onto the end, it now requires that previously existing optional parameters must now be specified, and sometimes that's just a little bit of a pain. Not a biggie, but... ehhh!
Yeah ... the MoveObjectToLocation() function killed off the need for: MoveItemToLocation, MoveCharacterToLocation(), MoveBoatXY() and MoveObjectToRealm()
Unlike all the other functions though, it puts it after the XY coordinates rather than the end (because you kinda always need it in this function).
Shinigami and I have been discussing.. that if I break up the other functions, that you cant have a _DEFAULT_REALM constant ... and setting one in every EM would probably be pretty annoying (like MAP_DEFAULT_REALM:="brittania")
We're thinking about .. making it so if the realm argument is 0 or error, to have the core attempt to auto-detect the realm the script is operating on. In most cases the core can do this. The only time it really can't is if you use start.ecl, and start scripts up (global control scripts), web scripts, aux scripts and hooks.
Unlike all the other functions though, it puts it after the XY coordinates rather than the end (because you kinda always need it in this function).
Shinigami and I have been discussing.. that if I break up the other functions, that you cant have a _DEFAULT_REALM constant ... and setting one in every EM would probably be pretty annoying (like MAP_DEFAULT_REALM:="brittania")
We're thinking about .. making it so if the realm argument is 0 or error, to have the core attempt to auto-detect the realm the script is operating on. In most cases the core can do this. The only time it really can't is if you use start.ecl, and start scripts up (global control scripts), web scripts, aux scripts and hooks.
Laziness prevails...
I just did attributes.em, vitals.em, storage.em and guilds.em
I don't feel like dealing with the _DEFAULT_REALM stuff at this time.
It would involve either setting a constant in each .em file, or making the core autodetect the realm the script is on, or always force a realm parameter.. I dont think anyone likes any of those options.
I just did attributes.em, vitals.em, storage.em and guilds.em
I don't feel like dealing with the _DEFAULT_REALM stuff at this time.
It would involve either setting a constant in each .em file, or making the core autodetect the realm the script is on, or always force a realm parameter.. I dont think anyone likes any of those options.
Having the core detect the realm and supply a default just plain worries me.
Since 097 is going to be a real pain in the butt to convert (thanks Austin for splitting up all the em files......) it comes down to either taking the time to code it in manually or finding another nice efficient place to store the _DEFAULT_REALM.
Personally I think that a default realm still has a lot of merit - after all not everyone is ever going to want realms. Stick it somewhere efficient if you like - like a set of constants in an em file that ALWAYS loads by default, a gprop or anything.
Since 097 is going to be a real pain in the butt to convert (thanks Austin for splitting up all the em files......) it comes down to either taking the time to code it in manually or finding another nice efficient place to store the _DEFAULT_REALM.
Personally I think that a default realm still has a lot of merit - after all not everyone is ever going to want realms. Stick it somewhere efficient if you like - like a set of constants in an em file that ALWAYS loads by default, a gprop or anything.
-
- Grandmaster Poster
- Posts: 104
- Joined: Tue Feb 07, 2006 3:32 pm
- Location: Pittsburgh, Pennsylvania
I wrote a program that automatically update your scripts and includes to call the appropriate use statements. When the first beta releaases, i'll release the program.Since 097 is going to be a real pain in the butt to convert
It is though, written in VB.NET and requires that .NET 2.0 is present. Sorry, its the only programing langauge I'm good with, still learning C++.
Just a thought... any way to possibly define a constants file just for constants only? I mean I know you could easily do it in includes but this would solve your problem with _DEFAULT_REALM since you dont have to tie constants to each individual EM.Austin wrote: I don't feel like dealing with the _DEFAULT_REALM stuff at this time.
It would involve either setting a constant in each .em file, or making the core autodetect the realm the script is on, or always force a realm parameter.. I dont think anyone likes any of those options.
-
- Adept Poster
- Posts: 85
- Joined: Wed Aug 30, 2006 5:24 pm
- Location: Italy
is this about Danielle's program? The best place to talk about that is in the post where its released for download. In the post, Danielle answered the problem you described already.
http://forums.polserver.com/viewtopic.php?t=589
http://forums.polserver.com/viewtopic.php?t=589