Example: Guestbook

A big new update is now available, introducing biomes, caves and much more!
Latest hotfix: 0.7.0.3 (2024-02-21)
  • Difficulty: Intermediate

    This plugin creates a World3DModel in the world (or multiple 3D models). The player can interact with these models (i.e. he can press his interaction key [F] while looking at them), then a GUI shows up. This GUI consists of a background image (an open book, like the journal), and several labels. It lists all players who have played on this world before, this data can be received from the world database (see: plugin.getWorldDatabase()).


    There are also two buttons to change the page. These are just two labels which are clickable (see: guiElement.setClickable(boolean)). Once they're clicked, the texts of the labels will be changed, so it gives the impression of changing the page (in addition, a sound file is played [see: player:playGameSound()]).


    Once the player presses his ESC key (see: player.registerKeys() and player.setListenForInput()), the guestbook will close (i.e. the visibility will be set to false).



    Note: The model and the textures are just very basic in terms of quality.



    Additional note: In order to keep the plugin versatile, the coordinates for the particular guestbook models are stored in a "coordinates.txt" file in the plugin main folder. So the coordinates can be changed (and even more instances of the model can be added) easily without the need to recompile the plugin.

  • Hallo red51


    wo müssen den die plugins eigentlich entpackt werden da ich längere zeit nicht da war weiss ich leider noch nicht bescheit über die sachen hier und welche muss ich da nehmen


    MFG
    Rana

    Wier Die Ausgestossenen


    TS3: 78.31.64.46 - Gameserver: CS:S 78.31.64.46:27015 - RW: IPV6: [2001:4ba0:babe:1575::]:26015

  • Wow ist really works perfectly! I mean this example as well as the full new api!!! :thumbsup:
    I'm really happy now with the new plugin api. Good Job :thumbsup::thumbsup::thumbsup:
    But (in this example) you have to set the coordinates in a file, so I think it isn't allready possible to do what I wanted to do: Would it be possible to add a world3dmodel to the workbench / sawmill, select the title of the object / requirements / max stack size and make it craftable from there in a later version of the api?

  • Hallo red51


    wo müssen den die plugins eigentlich entpackt werden


    --- sorry i'm using google translator --



    Machen Sie einen Ordner in Ihrem Spiel / Server-Verzeichnis und nennen Sie es
    "Plugins"


    Entpacken Sie die ZIP-Datei in den Ordner, den Sie gerade erstellt haben.


    Sollte jetzt so aussehen
    - Verschraubungen
    --- Gästebuch


    Schauen Sie in den Gästebuch - Ordner und öffnen Sie die
    coordinates.txt-Datei


    Bearbeiten Sie die Koordinaten zu einem Ort, den Sie in der Welt mögen.
    Speichern Sie die Datei und führen Sie das Spiel / Server


    Oder wenn Sie bereits das Spiel / Server ausgeführt haben, öffnen Sie die Konsole und geben Sie ein: reloadplugins


    ---------------------------- english -----------------


    make a folder in your game/server directory and name it
    "plugins"



    unpack the zip file into the folder you just created.


    should look like this now
    - plugings
    --- guestbook


    look inside of the guestbook folder and open the
    coordinates.txt file



    edit the coordinates to a place you like in the world.
    save the file and run the game/server


    or if you already got the game/server running open the console and type: reloadplugins

  • Im SingelPlayer funktioniert das alles ohne Probleme aber im MP passiert nichts. in der log befindet sich kein hinweis das eine api geladen wurde. gibt es zb in der server.properties einen neuen eintrag für die api ? ich versteh das nicht ????


    Can you tell me whether in the server.properties what has come to start the API on a server? In the single player runs the guestbook of Red51 but on our servers I get the API not visible. No API is displayed in the log.

  • THX
    SilverSatin


    Lenko ich habe auch lange gebraucht du must die anderen cords löschen und habe meine so eingetragen [-46.50, 64.0, 804.00, 0.0, 0.0, 0.0] die hinteren cords ist di ausrichtun nach süden westen und so mit reloadplugins soltest du eigentlich sehen das sie geladen ist bei mir steht das ich sie schon 9 mal geladen habe



    Log




    ADD PLUGIN: 9
    API: REGISTER LISTENER PlayerListener
    Guestbook plugin loaded successfully!


    mfg Rana


    P.S ich kanns auch noch nicht mit der api ;(

    Wier Die Ausgestossenen


    TS3: 78.31.64.46 - Gameserver: CS:S 78.31.64.46:27015 - RW: IPV6: [2001:4ba0:babe:1575::]:26015

    Edited 3 times, last by Ranaarvalis ().

  • Hab es nun zusammen mit @Ranaarvalis erledigen können.
    Im Einzelplayer hatte ich den Plugin Ordner mit großem "P" geschrieben und alles ging. nun auf den server übertragen und nichts geht mehr. der Plugin Ordner muß mit kleinen "p"lugin geschrieben werden und dann geht es.

  • Thanks for the feedback :)


    Would it be possible to add a world3dmodel to the workbench / sawmill, select the title of the object / requirements / max stack size and make it craftable from there in a later version of the api?

    Oh yes, definitely, that's in the works (but first we want to concentrate on the dungeons now, some people are already getting their knives out^^) ;)


    Im Einzelplayer hatte ich den Plugin Ordner mit großem "P" geschrieben und alles ging. nun auf den server übertragen und nichts geht mehr. der Plugin Ordner muß mit kleinen "p"lugin geschrieben werden und dann geht es.

    Ja also grundsätzlich wird es mit einem kleinen "p" geschrieben. Sorry wenn stellenweise im Forum die Infos noch unvollständig sind, wir werden das nachbessern. Windows macht sich aus Klein-/Großschreibung meist nicht viel, bei Linux hingegen spielt das schon eine Rolle (daher läufts dann im SP mit großen "P", auf dem Server (unter Linux) hingegen nicht ^^

  • Can anyone recommend an application to create 3D models

    One popular (and powerful) 3D modeling program is Blender. Biggest advantage: it's available for free.


    Another professional program which is frequently used by the video game industry is 3DS Max (3D Studio Max). Extremely powerful, but it takes some time to become familar with this tool. And it's pretty expensive...



    There is a 3D modeling program which has a very flat learning curve: Cinema4D. Still a powerful tool, it's easy to use and has a user-friendly UI, although it's more limited than 3DS Max. Unlike blender, this program is not available for free.


    Also, what format(s) are supported by the game?

    Currently the game supports .obj and .blend files, although I'm not sure if the .blend importer works properly at the moment. When it comes to the textures, it's always recommendable to use DDS textures (since they consume much less vram), but of course JPG and PNG images are also supported.

  • You may as well give Wings3D a shot. I find it superior for speed modling where Blender is simply overwhelming especially for a beginner. It's probably enough for what you're going to achieve and even easy on the resources 8)

  • Make sure to check some quickstart tutorial as well. Wings3D is best hotkey driven (and once you get the idea it's really likeable - IMHO). I created most of the game assets (and even the sprite based animations) of maxr.org (opensource, non profit) with this without prior knowledge of 3D art. "Someone had to do it" so I did.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!