[Plug-in] Planks 'n Beams with ANY (built-in) texture

The next update will be available on Wednesday, December 18, in the early evening (GMT+1).

This update will not yet replace the Java version, instead it is the actual content update. We'll provide more information about the transition together with the update.
  • A plug-in allowing any player to get planks, triangular planks, beams, logs and 4 type of windows textured with any of 198 built-in RW construction textures (in other words, the textures of the blocks, which in full creative mode can be obtained wit the console command "item woodplank/beam/log <qty> <textureId>"), even outside of full creative mode.


    It is not intended as a way of cheating, but as a way to extend building possibilities. Then, items have a cost in resources: by default, the same cost a block with the same texture would have: stones, sandstones, dirt, iron ingots, copper ingots (but wood lumbers are used instead of logs).


    Version 0.5.4


    *) Apparently NetBeans does not automatically rebuild all the necessary source files and some of the last fixes did not went through into the .jar. This version is a full rebuild with all the known bugs really fixed! All servers using previous versions are strongly invited to upgrade!


    Version 0.5.3


    *) Fixed a bug with iron and copper ingot ID's: now iron and copper materials are correctly consumed on item making.


    Version 0.5.2


    *) Fixed a bug with new window ID's: now all windows can be properly created.


    Version 0.5.1


    *) Fixed a bug when switching to the last screen of textures while the selected image is greater than the last screen max image.


    Version 0.5.0


    *) Updated to latest plug-in API (0.9.3): now it should work correctly with the latest RW server and client.


    Version 0.4.1


    *) Fixed a bug with the type selection radio buttons.


    *) When in creative mode, resources are free only if the permission file for the player has "freecrafting" set to true.


    - Features



    *) Any of the 198 built-in construction textures can be used (there are 4 screens as the one shown above, through the Up and Down arrows on the right).


    *) Selection of Plank, Beam, Log, Triangle and the 4 type of window frames.


    *) 1 to 64 quantity.


    *) "Min" and "Max" button to jump to minimum (1) and maximum (64) quantity.


    *) ID of textures.


    *) The cost in resources of the current selection is shown.


    *) The player must have enough resources in the inventory (any slot) to "buy" all the selected items; if there are not enough resources, the player is notified in the chat and nothing happens.


    *) On buy, the resources are withdrawn from the inventory and the new items left in it.


    *) By default, one item costs one resource, but greedy server owners can set a higher cost in the plug-in settings.properties.


    *) A setting allows to have item for free (no resources needed) for admins and / or while in creative mode, as in the vanilla game.


    *) All GUI texts can be localised to any other language. English and Italian are provided; Files for German and French (France and Canada) are provided as examples but untranslated. Details in the locale/readme.txt file.
    ____________________


    Important - Important - Important - Important:


    in order to work the plug-in requires the GUI back-end plug-in 0.5.0 available here. Install it at the same time of (or before) installing this plug-in or the server will crash at start-up!
    ____________________


    - Commands


    There is only one command: /pnb (for Planks 'N Beams, but configurable in the plug-in settings.properties) which shows the above screen.


    Installation


    *) Extract the files in the ZIP placing the whole pnb folder into the plugins folder of RW (if the plugins folder does not exist, just create one). The resulting hierarchy shall be:


    Code
    ── RisingWorld
    ├── plugins
    │ ├── pnb
    │ │ ├── assets
    │ │ ├── locale
    │ │ ├── pnb.jar
    │ │ └── settings. properties


    Open points and known issues


    *) As built-in images cannot be accessed, the plug-in has its own, reduced, version of the textures for the GUI and must send them to the client for display; this may affect bandwidth. Only actual practice may tell if and how much. (This only refers to the images used in the GUI, not to the textures actually used to texturise the items, which RW manages internally).


    *) The GUI images come from RW own textures, scaled to 50% and cropped to 64x64 pixels (to fit a reasonable amount of textures in a screen). I hope this does not result in a copyright infringement. I tried to put the images inside the .jar, as a measure of (rather limited) protection, but I could not find a way (see here for details).


    *) Other bugs may well exist! I did my best but foreseeing all the possible use cases and contexts is hard. Post here bug reports, with specific steps to replicate the issues and I'll try to correct them.


    I really need steps or instructions to replicate the problem on my PC or I cannot fix it!


    Source Code


    The source code for this plug-in is available on github .


    Enjoy!

  • Very nice. For people who are not allowed to use the console, very good feature. :thumbsup:

    This was precisely my idea. Thanks!

    Is there any possibility to add a ground texture like gravel in this plugin?

    No. The texturing is done (and can only be done) by RW itself; then, the plug-in is a medium to the RW own texturing and those are all the 192 textures which RW knows to use. Should RW add more textures in the future, they can be added to the plug-in.


    [Aside: As discussed here, a future update may make built-in textures directly accessible to plug-ins for display; this would drastically reduce the size of this plug-in and the server-client bandwidth, as the plug-in would not need to contain a display copy of the textures and to send them to the player client for showing the GUI.]

  • Hi Miwarre.


    I have just started using this since its recent installation on one of the servers I play. It is fantastic in so many ways, not least in avoiding me being a pain to the admins requesting them to make planks all the time for me.
    I am also expecting it will lift the standard of building within the whole community.


    So yesterday I made a lot of fence with custom beams and planks. This required about 10 stacks of plank fence paling's. Add on the beams for posts and rails and I had well over 700 mouse clicks to complete the purchase. Poor mouse was very tired! Needed extra cheese rations. :D


    Therefore I wondered if you could do anything to enable bulk buy - perhaps like we do at at the saw bench have a max button to buy a full stack with one click.
    My mouse would appreciate it very much.


    Cheers
    PB

    Incurably addicted to Rising World

  • It is fantastic in so many ways, not least in avoiding me being a pain to the admins requesting them to make planks all the time for me. I am also expecting it will lift the standard of building within the whole community.

    Thanks!

    Therefore I wondered if you could do anything to enable bulk buy - perhaps like we do at at the saw bench have a max button to buy a full stack with one click.
    My mouse would appreciate it very much.

    Good idea! And, definitely, we should stand for the rodent civil rights and stop this barbaric exploitation! ;) As soon as the back-end RWGui plug-in will exit the current phase of re-writing (potentially influencing consumer plug-ins, like this one), I'll post an update.

  • Not sure if its just me but it seems the scaling of the textures on these planks etc is different to the default scaling, like about half... is this intentional ??

  • Still confused, I thought it was just the GUI that 50% sizing referred too, not the actual textures seen on the planks when placed.

  • Still confused, I thought it was just the GUI that 50% sizing referred too, not the actual textures seen on the planks when placed.

    Indeed! Textures on planks are placed by RW itself, the plug-in just tells it which one to use.


    Try by getting one non-standard-textured plank via the plug-in and the same via the creative mode console command "item woodplank <numberOfItems> <idOfTexture>" and they should be the same.

  • Confirmed, all is at you say, must be part of the RW programming.


    Was hoping a plank with texture id 27 would fit in with a block of the same texture.


    Ok for now I will use them seperately, looks really odd if near each other


    Thanks for your quick responses Miwarre..

  • Installed the PnB and all seems to be working ok but when i exit the PnB gui im getting this error message in the chat window ( error occurred in plug `com.vms.planks and beams` (Author:Maurizio M. Gavioli aka Mlwarre) ->null


    Im sort of guessing that this shouldn't show up but like I said it seems to be working ok?

Participate now!

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