Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Atlantis (https://forums.graalonline.com/forums/showthread.php?t=134267580)

scriptless 12-17-2012 06:43 PM

Quote:

Originally Posted by Crow (Post 1709755)
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?

Crow 12-17-2012 06:53 PM

Quote:

Originally Posted by scriptless (Post 1709757)
so would it work like this?

translatedlanguages=de,fr,more languages

It should!


Quote:

Originally Posted by scriptless (Post 1709757)
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.

zerxusgraal 12-17-2012 07:03 PM

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".

Starfire2001 12-17-2012 07:54 PM

Cool stuff!

Let's not start arguing about npulse for no reason now though.

DustyPorViva 12-17-2012 07:58 PM

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 :)

Crow 12-18-2012 07:18 PM

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.

MysticalDragon 01-02-2013 07:36 PM

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?

MysticalDragon 01-02-2013 08:53 PM

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.

Crow 01-04-2013 10:09 PM

Quote:

Originally Posted by MysticalDragon (Post 1711413)
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 (Post 1711572)
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~

MysticalDragon 10-07-2014 04:56 PM

Didn't see this, at first I was like wtf? But once you understand it its easy to follow, add to it.


All times are GMT +2. The time now is 12:17 AM.

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