Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-17-2012, 10:26 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Atlantis

As promised, here is most of Atlantis' code and some other resources you can use. Keep in mind, anything that is not included in this package which is content of Atlantis, you are not allowed to use on your playerworld.

A couple notes:
  • The baddy code is not included, since it was a mod of Gambet's GBaddy (which can be found in the Code Gallery as well) and was rather hackish in its whole nature; nothing to learn from, really.
  • Due to Stefan's optimizations on tile update stuff, when "removing" objects such as bushes, stones and the like, the tile changes below may disappear again before the object actually respawns. You can actually fix this by changing the updateBoard() calls in the object class to update 3x2 instead of 2x2 tiles.
  • I removed all (I guess) cheat detection code, since it's generally not a good idea to make things like that public. Wasn't anything fancy anyway, but still..
  • Yes, I did shamelessly copy the basic ideas of Era's staff tools. They're good!


No guarantee for good code. There are also probably a few bugs here and there. I'm not providing any more information right off the bat. If you need help or have any questions, please ask them in this thread. No PMs if it's not about anything critical.

Thank you.
Attached Files
File Type: zip atlantis.zip (2.94 MB, 726 views)
Reply With Quote
  #2  
Old 12-17-2012, 05:17 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
must spread reputation
__________________
MEEP!
Reply With Quote
  #3  
Old 12-17-2012, 05:30 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
It's not like I need that. I am happy as long as some of this can be of help to someone, be it directly or indirectly.
Reply With Quote
  #4  
Old 12-17-2012, 05:32 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Oh wow. This is fantastic. +rep
Reply With Quote
  #5  
Old 12-17-2012, 05:55 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
well it really is fantastic. cool things being included to work with the default movement rather than creating a custome one.
can most likely help me with some things so i dont have to create a custome one
__________________
MEEP!
Reply With Quote
  #6  
Old 12-17-2012, 06:05 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Looking forward to seeing this on N-Pulse.. because I'll bet anyone it happens.. LOL
Reply With Quote
  #7  
Old 12-17-2012, 06:11 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by scriptless View Post
Looking forward to seeing this on N-Pulse.. because I'll bet anyone it happens.. LOL
If it helps, it's good. I'm not just releasing this for craps and giggles. I hope no one is being looked down on for using this, because that's really not right.
Reply With Quote
  #8  
Old 12-17-2012, 06:17 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Crow View Post
If it helps, it's good. I'm not just releasing this for craps and giggles. I hope no one is being looked down on for using this, because that's really not right.
I know, im just predicting the future.. hopefully they don't end up taking stuff that's not public use tho.. like they keep doing to Dusty.. he just the other day yelled at them... again ... seems telling them no doesn't stop them

Atlantis will be missed, it looked so promising. I really wanted it to go public so I could play it.. First time I saw the server it was in another language, not sure if it ever became English?
Reply With Quote
  #9  
Old 12-17-2012, 06:19 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by scriptless View Post
another language
german :P
regarding the textbox script, they wanted to use graals translation thingy
__________________
MEEP!
Reply With Quote
  #10  
Old 12-17-2012, 06:21 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by callimuc View Post
regarding the textbox script, they wanted to use graals translation thingy
Indeed. Plan was English + German. Not sure if N-Pulse's bush is really taken from Dusty though, might really just be a LttP remake; we'll see. If they take any graphics from Atlantis, I'll know
Reply With Quote
  #11  
Old 12-17-2012, 06:23 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Crow View Post
Indeed. Plan was English + German. Not sure if N-Pulse's bush is really taken from Dusty though, might really just be a LttP remake; we'll see. If they take any graphics from Atlantis, I'll know
Alot of time they would tell me if they changed the color's around it was not copying.. it really looks like Dusties remake of lttp tho..

But your saying that the Graal Translation didn't work? And how does that work exactly? Is it some sort of scripting for translation or doe's graal attempt to translate it all itself ?
Reply With Quote
  #12  
Old 12-17-2012, 06:26 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by scriptless View Post
But your saying that the Graal Translation didn't work?
I did? I don't think so It does work. You just provide all translation files, and if it can't find any for the selected client language, it will default to the original input text. I can provide more details on the system later, bit busy right now.
Reply With Quote
  #13  
Old 12-17-2012, 06:29 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by scriptless View Post
Alot of time they would tell me if they changed the color's around it was not copying.. it really looks like Dusties remake of lttp tho..

But your saying that the Graal Translation didn't work? And how does that work exactly? Is it some sort of scripting for translation or doe's graal attempt to translate it all itself ?
well you can have a translation by doing something like
PHP Code:
echo( _("hello") ); 
which would translate it into the clients language being set (i think changeable through the f3 options but im not sure since i have only been using this on iEra even though the translations are never updated)

im not too sure if there are any guidelines for uploading the translations, but in case you want to see how the file would have to look like, simply check your graal folder - levels - translations and open one of those .po files with a text editor
__________________
MEEP!
Reply With Quote
  #14  
Old 12-17-2012, 06:34 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
callimuc, threw you some Rep ++... thanks for the information, it is very useful. crow, I think I rep you to much also.. lmao because ALOT of people I cannot rep... fccmike, crono, u, dusty... i mean wow I must rep ++ alot.. xD

Quote:
Originally Posted by Crow View Post
I did? I don't think so It does work. You just provide all translation files, and if it can't find any for the selected client language, it will default to the original input text. I can provide more details on the system later, bit busy right now.
Sorry read wrong post, I was reading how callimuc said "they wanted to" and assumed that it was saying it didn't work.

That's neat. Tho does graal have languages anymore?

Edit: It does.. didn't it used to be on the first screen that poped up where you entered in your login info?
Reply With Quote
  #15  
Old 12-17-2012, 06:38 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by scriptless View Post
Edit: It does.. didn't it used to be on the first screen that poped up where you entered in your login info?
Yup, that's where it was. This is the folder config stuff for translations on Atlantis:
PHP Code:
file    translations/*.po
file    translations/en/*.po
file    translations/de/*.po 
I believe clientside translation files were put into levels/translations/*, and serverside ones in their respective sub folders. Then, in the server options, we have this:
PHP Code:
serverlanguage=en
defaultlanguage
=en
translatedlanguages
=de 
Finally, in a system WNPC (file names for translations were atlantis_en.po and atlantis_de.po, and just atlantis.po for serverside ones):
PHP Code:
loadTranslation("atlantis"); 
The rest of the magic is done by Graal and the _() function.
Reply With Quote
  #16  
Old 12-17-2012, 06:43 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Crow View Post
Yup, that's where it was. This is the folder config stuff for translations on Atlantis:
PHP Code:
file    translations/*.po
file    translations/en/*.po
file    translations/de/*.po 
I believe clientside translation files were put into levels/translations/*, and serverside ones in their respective sub folders. Then, in the server options, we have this:
PHP Code:
serverlanguage=en
defaultlanguage
=en
translatedlanguages
=de 
Finally, in a system WNPC:
PHP Code:
loadTranslation("atlantis"); 
The rest of the magic is done by Graal and the _() function.
so would it work like this?

translatedlanguages=de,fr,more languages

and for loadTranslation("atlantis"); thats the name of the po file, right? im under the impression that you only need the loadTranslations once, and it will load for any language set?
Reply With Quote
  #17  
Old 12-17-2012, 06:53 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by scriptless View Post
so would it work like this?

translatedlanguages=de,fr,more languages
It should!


Quote:
Originally Posted by scriptless View Post
and for loadTranslation("atlantis"); thats the name of the po file, right? im under the impression that you only need the loadTranslations once, and it will load for any language set?
It's the name of the translation file, yes. I just now wonder if it automatically appends the underscore and language domain (the two characters used to shorten the language) or the files without the language domain appended were for clientside translations after all.. well, just give it a shot! RC should also output some nifty messages when uploading the serverside translation files. If that hasn't been removed, that is.
Reply With Quote
  #18  
Old 12-17-2012, 07:03 PM
zerxusgraal zerxusgraal is offline
Making Levels
Join Date: Apr 2012
Location: Sweden
Posts: 48
zerxusgraal will become famous soon enough
Im sad to see atlantis no longer being worked on.
It looked great, gfx scripts and levels
Its very nice of you to share your work with the community. Thank you for that.

To scriptless:
N-Pulse used alot of free graphics when we started.
Some missunderstandings were made and brought to our attention. We then removed those images and appologised for our mistakes.
We have a talented team in all areas now and it saddens me to see you see us as "thieves".
Reply With Quote
  #19  
Old 12-17-2012, 07:54 PM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Cool stuff!

Let's not start arguing about npulse for no reason now though.
__________________
-Ph8
Reply With Quote
  #20  
Old 12-17-2012, 07:58 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Ah well, I can't rep What a pity, but I really appreciate people like Crow who put so much passion into their work. It's a pity Atlantis didn't make it, but it's great to see people who are willing to let go and let others benefit from their hard work instead of hoarding it in their backup folder that will probably never see the light of day again.

As for the N-Pulse deal I don't hold grudges. I never followed up and checked to see if they removed the bush as I realize sometimes confusion/mistakes happen. But let's not spam Crow's thread with that mess
Reply With Quote
  #21  
Old 12-18-2012, 07:18 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
One more thing that comes to mind: if you use Atlantis' graphics as a reference in order to understand how the code works (which is completely fine as long as you're not using the graphics), you may notice that the rain effect on the windows is sometimes below, sometimes above the window graphics. This is due to insufficient layer control in Graal. I wanted to move that rain animation into a gani, along with the windows, but never got around to it. So, if you want to go with a similar approach and use my code for it, you can/should do that.
Reply With Quote
  #22  
Old 01-02-2013, 07:36 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is a jewel in the roughMysticalDragon is a jewel in the rough
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
When using your custom projectiles, I noticed that other people can't see your thrown objects but you can see your own. Any idea why?
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #23  
Old 01-02-2013, 08:53 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is a jewel in the roughMysticalDragon is a jewel in the rough
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
I fixed it, odd issue. But I think it's how stefan tweaked player.triggerclient. I added a null to the end of the triggerclient were it sends the data and it worked.
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #24  
Old 01-04-2013, 10:09 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by MysticalDragon View Post
I fixed it, odd issue. But I think it's how stefan tweaked player.triggerclient. I added a null to the end of the triggerclient were it sends the data and it worked.
Must be the difference between v5 and v6 then. I should've said it in the first post: some things only work with v6, even though a fix for v5 would be quite simple. I didn't want to focus on old versions though. Also:

Quote:
Originally Posted by MysticalDragon View Post
it would be a lot easier and more modifiable if you would just make your own dropping system, imo. Atlantis has a great dropping system, check it out in the code gallery.
You reminded me of some awkward logic/math stuff I did there. Have a look (item class):
PHP Code:
function onCreated() {
  
// create a random item, wohoo!
  
if (this.dItem == NOTHING) {
    
temp.chances = { 0.40.510.510.510.610.660.680.780.830.85 };
    
temp.random(01);
    
    for (
temp.0<= chances.size(); i++) {
      if (
== && chances[0])
        
this.dItem 1;
      elseif (
== chances.size() && >= chances[1])
        
this.dItem chances.size() + 1;
      elseif (
>= chances[1] && chances[i])
        
this.dItem 1;
    }
  } 
Does that make sense? I wonder. It lacks some proper comments. Check the enumeration at the top of that class to see which items it'll distribute with which percentage, and keep in mind that subtracting the value of the n-1th array element from the value of the nth array element yields the chance for the n+1th item. Doesn't make sense? Sorry~
Reply With Quote
  #25  
Old 10-07-2014, 04:56 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is a jewel in the roughMysticalDragon is a jewel in the rough
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Didn't see this, at first I was like wtf? But once you understand it its easy to follow, add to it.
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.