SphereCommunity
Open your mind, make the impossible! - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: General Discussion (/Forum-General-Discussion)
+--- Forum: UO/Sphere Discussion (/Forum-UO-Sphere-Discussion)
+--- Thread: Open your mind, make the impossible! (/Thread-Open-your-mind-make-the-impossible)

Pages: 1 2 3


Open your mind, make the impossible! - Extreme - 08-21-2014 04:14 AM

Do you know what to do when you have a nice idea but you think its impossible on Sphere?

Well, I don't think like you!

We know that some stuff can't be done when you don't have compatibility or support on sphere core.

Do you know the UltimaLive? (Only available in RunUO)
This is UltimaLive:




This is MY UltimaLive:




"Ahhh but you copied the UltimaLive from RunUO"
Yes, I did, but using Sphere!

"But your trees don't fall down..."
Yeah, I didn't add the tileart on my art.mul Big Grin Lazy...

"But how did you do this?"
What? Hide the trees and foliages?
I place the same tree/foliage in every tree in statics and then removed them from statics. Now they are all dynamic items.

"But this will lag..."
Yes if you have a 56Kbps connection and a Pentium 133MHz...

"No, SPHERE will lag!!!"
Really? There are many server with more then 1 million items in world, why 10k or less trees will lag?

Any question will be answered, but the system will not be shared right now.
It will be part of SpherePlay when we set it up.


RE: Open your mind, make the impossible! - admin phoenix - 08-21-2014 07:26 PM

very nice idea!
what about the growing of the tree?
also implented or will the world in the future without trees? Smile
If I had more time I would like spend more time in developing new amazing scripts Smile
but this will at first when the children grow up .... maybe in 10 years Smile


RE: Open your mind, make the impossible! - MrX - 08-21-2014 10:24 PM

great job u do lol


Re: RE: Open your mind, make the impossible! - Extreme - 08-21-2014 11:53 PM

(08-21-2014 07:26 PM)admin phoenix Wrote:  very nice idea!
what about the growing of the tree?
also implented or will the world in the future without trees? Smile
If I had more time I would like spend more time in developing new amazing scripts Smile
but this will at first when the children grow up .... maybe in 10 years Smile

The trees appears again with respawn timer based on regionresource cooldown.
I didn't put it to grow because I don't have the tileart.

I always do something new to practice my scripting.. Is good to learn new things and improve others.

I'm now coding the chat system using database and a full log of each player talk, even in common speak, party and guild...

Hehehehhe good luck with the children and congratulations! I like kids Smile


(08-21-2014 10:24 PM)MrX Wrote:  great job u do lol
Thanks


RE: Open your mind, make the impossible! - Crusader - 08-26-2014 12:51 AM

Bravo!
I would do the same...badly if i think to make all the static tree to not static....i will go puke...do there is a -fast- way to do this?


Re: RE: Open your mind, make the impossible! - Extreme - 08-26-2014 02:02 AM

(08-26-2014 12:51 AM)Crusader Wrote:  Bravo!
I would do the same...badly if i think to make all the static tree to not static....i will go puke...do there is a -fast- way to do this?

First you do a for loop checking every tile in the map searching for static trees and folliages. If found, create the same tree and folliage there.
After this you need to remove all static trees and folliages. I have an exe to remove almost all of them. Feeh did it for me. Just put it in uo folder and run. It will make a new static files without the trees and folliages. I will attach it.


RE: Open your mind, make the impossible! - Crusader - 08-26-2014 02:16 AM

yeah but we have different maps....but if u can share the program, at least will be useful for all ppl that has a custom map... Big Grin

besides...i use also custom trees...from the Eriminator Muls... is the program of Feeh customizable?


RE: Open your mind, make the impossible! - XuN - 08-26-2014 02:26 AM

For what I've understood ... the problem checks for all items in all tiles, so it doesn't matter what map/statics do you have because it will not care about design, but positions.


RE: Open your mind, make the impossible! - Extreme - 08-26-2014 02:40 AM

(08-26-2014 02:16 AM)Crusader Wrote:  yeah but we have different maps....but if u can share the program, at least will be useful for all ppl that has a custom map... Big Grin

besides...i use also custom trees...from the Eriminator Muls... is the program of Feeh customizable?
You can use it on any staticsX.mul files where X is the number of the map.
You will need to change the name to the exe find it.

Feeh told me he could change using the ids from a file to remove the trees, I will tell him later to check if he can do it for us.

(08-26-2014 02:26 AM)XuN Wrote:  For what I've understood ... the problem checks for all items in all tiles, so it doesn't matter what map/statics do you have because it will not care about design, but positions.
Yes, you're right.

How to use the exe:
1 - make a backup of all statics files.
2 - rename your staidx0.mul to staidx0.mul.orig AND statics0.mul to statics0.mul.orig
3 - run the exe and it will be ok.

You have more maps? no problem, change the staticsX.mul to statics0.mul.orig AND staidxX.mul to staidx0.mul.orig
Do it on all maps...

here is the code to check and create trees.
PHP Code:
[FUNCTION CREATEDYNAMICTREES]
FOR 
X 512 2048
 
FOR Y 512 2048
  
IF <SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS>
   FOR 
I 0 <EVAL <SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS>-1>
    IF !<
ISEMPTY <SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS.<dLOCAL.I>.TYPE>>
     IF (<
SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS.<dLOCAL.I>.TYPE> == T_TREE)
      
SERV.NEWITEM <SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS.<dLOCAL.I>.ID>
      NEW.
<dLOCAL.X>,<dLOCAL.Y>,<SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS.<dLOCAL.I>.Z>,0
      
NEW.FIX
     
ENDIF
     IF (<
SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS.<dLOCAL.I>.TYPE> == T_FOLIAGE)
      
SERV.NEWITEM <SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS.<dLOCAL.I>.ID>
      NEW.
<dLOCAL.X>,<dLOCAL.Y>,<SERV.MAP(<dLOCAL.X>,<dLOCAL.Y>,0,0).STATICS.<dLOCAL.I>.Z>,0
      
NEW.FIX
     
ENDIF
    ENDIF
   ENDFOR
  ENDIF
 ENDFOR
ENDFOR
RETURN 

See that it is checking only in MAP 0, so you will have to change it.
And change the FOR X and FOR Y to your map size.


RE: Open your mind, make the impossible! - Feeh - 08-26-2014 05:38 AM

(08-26-2014 02:16 AM)Crusader Wrote:  is the program of Feeh customizable?

No, it contains an internal list of tree IDs which you can see at the end of the program execution. It may not contains some trees and if you do use custom muls the chances to leave trees on the map is increased

(08-26-2014 02:40 AM)Extreme Wrote:  Feeh told me he could change using the ids from a file to remove the trees

Not a hard task, but...I had no idea of this coming to public so it is made based on Extreme's muls Tongue