Jump to content

Gambling


Blight

Recommended Posts

Hiho, some players on my server are definitely to rich, they own to much resources... so we need a gamble machine :smile-new:

 

and since I have not seen anything like that yet...

 

 

20171214124227_1.thumb.jpg.bb1b18d0972ef1e8129321d91646d4ff.jpg

 

 

 

 

For A16.4:

 

 

 

Blocks.xml

 

 

<block id="xxx" name="gamble">

<property name="CustomIcon" value="airConditioner" />

<property name="DescriptionKey" value="farmerDesc"/>

<property name="Material" value="Mbedrock" />

<property name="Shape" value="New"/>

<property name="LightOpacity" value="4"/>

<property name="EconomicValue" value="10"/>

<property name="Model" value="pipe_cap"/>

<property name="Texture" value="521"/>

<property name="ImposterExclude" value="true"/>

<property name="Place" value="TowardsPlacerInverted" />

<property name="CanPickup" value="false"/>

<property class="UpgradeBlock">

<property name="ToBlock" value="gambleloot"/>

<property name="Item" value="Casino-Ticket"/>

<property name="ItemCount" value="1"/>

<property name="UpgradeHitCount" value="1"/>

</property>

</block>

 

 

<block id="xxx" name="gambleloot">

<property name="Material" value="Mbedrock"/>

<property name="StabilitySupport" value="false"/>

<property name="Shape" value="Ext3dModel"/> <property name="Texture" value="293"/>

<property name="Mesh" value="models"/>

<property name="Model" value="LootContainers/chest02" param1="main_mesh"/> <property name="HandleFace" value="Bottom"/>

<property name="Texture" value="521"/>

<property name="ImposterExchange" value="imposterCTREighth" param1="98"/>

<property name="IsTerrainDecoration" value="true"/>

<property name="Class" value="Loot"/>

<property name="LootList" value="104"/>

<property name="DescriptionKey" value="furnitureGroupDesc"/>

<property name="DowngradeBlock" value="gamble"/>

<property name="EconomicValue" value="56"/>

</block>

 

 

 

Items.xml

 

 

<item id="xxxx" name="Casino-Ticket">

<property name="CustomIcon" value="questMaster"/>

<property name="CustomIconTint" value="FF00FF"/>

<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>

<property name="Meshfile" value="Items/Misc/casino_coinPrefab"/>

<property name="Material" value="stone"/>

<property name="HoldType" value="21"/>

<property name="Stacknumber" value="500"/>

<property name="EconomicValue" value="5"/>

<property name="EconomicBundleSize" value="1"/>

<property name="SellableToTrader" value="false"/>

<property name="RepairTime" value="0.5"/>

<property name="RepairAmount" value="20"/>

<property name="CraftingIngredientTime" value="0.2"/>

</item>

 

add to item: stoneAxe, wrench, nailgun, clawhammer:

<property name="Allowed_upgrade_items" value="....... Casino-Ticket"/>

 

 

 

 

Loot.xml

Put your own stuff in the loot.xml, this is just an example, containers t1-t5, t5 proccs around ~every 250 tickets 1x

 

 

<lootgroup name="gambleT1low">

<item name="oldCash" count="10" prob="0.5"/>

<item name="casinoCoin" count="50"/>

</lootgroup>

 

<lootgroup name="gambleT1high">

<item name="oldCash" count="25" prob="0.5"/>

<item name="casinoCoin" count="100"/>

<item name="redTea" count="1"/> prob="0.1"/>

<item name="steelPolish" count="5"/> prob="0.01"/>

</lootgroup>

 

<lootgroup name="gambleT1Ticket">

<item name="Casino-Ticket" count="1"/> prob="1"/>

</lootgroup>

 

<lootgroup name="gambleT2">

<item name="Casino-Ticket" count="1"/> prob="1"/>

</lootgroup>

 

<lootgroup name="gambleT3">

<item name="Casino-Ticket" count="1"/> prob="1"/>

</lootgroup>

 

<lootgroup name="gambleT4">

<item name="Casino-Ticket" count="1"/> prob="1"/>

</lootgroup>

 

<lootgroup name="gambleT5">

<item name="Casino-Ticket" count="1"/> prob="1"/>

</lootgroup>

 

<lootcontainer id="104" count="1" size="1,1" destroy_on_close="true" sound_open="UseActions/open_apache_artifact_chest" sound_close="UseActions/close_apache_artifact_chest" loot_quality_template="baseTemplate">

<item group="gambleT1low" prob="1"/>

<item group="gambleT1high" prob="0.4"/>

<item group="gambleT1Ticket" prob="0.1"/>

<item group="gambleT2" prob="0.1"/>

<item group="gambleT3" prob="0.01"/>

<item group="gambleT4" prob="0.008"/>

<item group="gambleT5" prob="0.002"/>

</lootcontainer>

 

 

 

Recipes.xml

 

 

<recipe name="Casino-Ticket" count="1" craft_time ="240">

<ingredient name="casinoCoin" count="800"/>

</recipe>

 

<recipe name="Casino-Ticket" count="1" craft_time ="240">

<ingredient name="rockSmall" count="2500"/>

</recipe>

 

<recipe name="Casino-Ticket" count="1" craft_time ="240">

<ingredient name="scrapIron" count="1000"/>

</recipe>

 

 

 

 

 

 

For A17 - 17.4 (as modlet):

 

 

gamb.jpg

 

V.1: Craft only (Tickets)

https://workupload.com/file/4ygSp3mQ

hgjhjg.jpg

 

 

V.2: Loot only (everywhere)

https://workupload.com/file/YDsHVqMA

 

 

V.3: Loot and Craft

https://workupload.com/file/2RWRU2aP

 

 

 

For testing (spawn with 10 tickets) and some advertising :courage:

 

[PvE] - [PvE] - Pimp My House - Nightmare - 91.200.101.71:26000

 

[PvE] - [PvE] - Pimp My House - Tea Lounge - 91.200.101.71:25000

Link to comment
Share on other sites

You're missing xml code in your spoilers

 

Otherwise care to explain the function of the mod? From what I gathered upon quickly pausing the video on your signs: "Craft a Casino Ticket, grab an upgrade tool and right-click one of the blocks (steel balls). There is a very low chance to get full Ancient Event stuff." You spend 800 Casino Coins on one Casino Ticket and the output is the single slot top-left on the steel ball.

Link to comment
Share on other sites

was not finish, some parts need to be explained.

 

you need to put your own stuff in the loot.xml. container t5 proccs every ~250 tickets, for rare items.

 

 

my loot.xml, DONT use it (cause of the modded items)

 

 

<lootgroup name="gambleT1low">

<item name="oldCash" count="10" prob="0.5"/>

<item name="Chocolate" count="1" prob="0.1"/>

<item name="casinoCoin" count="50"/>

<item name="Cane Sugar" count="1" prob="0.2"/>

<item name="Milk Powder" count="1" prob="0.1"/>

</lootgroup>

 

<lootgroup name="gambleT1high">

<item name="oldCash" count="25" prob="0.5"/>

<item name="casinoCoin" count="100"/>

<item name="redTea" count="1"/> prob="0.1"/>

<item name="steelPolish" count="5"/> prob="0.01"/>

<item name="Cocoa Powder" count="1" prob="0.1"/>

</lootgroup>

 

<lootgroup name="gambleT1Ticket">

<item name="Casino-Ticket" count="1"/> prob="1"/>

<item name="Casino-Ticket" count="2"/> prob="1"/>

</lootgroup>

 

<lootgroup name="gambleT2">

<item name="Cocoa Beans" count="1" prob="0.1"/>

<item name="Advanced Splint" count="1"/> prob="0.01"/>

<item name="Diamond" count="5"/> prob="0.3"/>

<item name="TommysKit" count="1"/> prob="0.15"/>

<item name="Titan" count="10"/> prob="0.3"/>

<item name="Starter Drink" count="1"/> prob="0.1"/>

<item name="firstAidKit" count="1"/> prob="0.3"/>

<item name="Gold Powder" count="1"/> prob="0.01"/>

<item name="Forged Gold" count="1"/> prob="0.01"/>

<item name="goldNugget" count="1"/> prob="0.1"/>

<item name="Gold Ingot" count="1"/> prob="0.01"/>

<item name="Shocking 762mmBullet" count="2"/> prob="0.3"/>

<item name="Exploding 762mmBullet" count="1"/> prob="0.20"/>

<item name="Burning 762mmBullet" count="2"/> prob="0.4"/>

</lootgroup>

 

<lootgroup name="gambleT3">

<item name="TommysKit" count="1"/> prob="0.15"/>

</lootgroup>

 

<lootgroup name="gambleT4">

<item name="Titan Shovel" quality="50,600"/> prob="0.1"/>

<item name="Titan Pickaxe" quality="50,600"/> prob="0.1"/>

<item name="Titan Fireaxe" quality="50,600"/> prob="0.1"/>

</lootgroup>

 

<lootgroup name="gambleT5">

<item name="minerParts" prob="0.6"/>

<item name="Ancient Auger Parts" quality="50,450"/> prob="0.1"/>

<item name="Ancient Auger Blade" quality="50,450"/> prob="0.1"/>

<item name="Blade [Event]" quality="50,450"/> prob="0.1"/>

<item name="Ancient Sniper Barrel" quality="50,450"/> prob="0.1"/>

<item name="Ancient Fireaxe" quality="50,600"/> prob="0.1"/>

<item name="Ancient Pickaxe" quality="50,600"/> prob="0.1"/>

<item name="Ancient Shovel" quality="50,600"/> prob="0.1"/>

</lootgroup>

 

<lootcontainer id="104" count="1" size="1,1" destroy_on_close="true" sound_open="UseActions/open_apache_artifact_chest" sound_close="UseActions/close_apache_artifact_chest" loot_quality_template="baseTemplate">

<item group="gambleT1low" prob="1"/>

<item group="gambleT1high" prob="0.4"/>

<item group="gambleT1Ticket" prob="0.1"/>

<item group="gambleT2" prob="0.1"/>

<item group="gambleT3" prob="0.01"/>

<item group="gambleT4" prob="0.008"/>

<item group="gambleT5" prob="0.002"/>

</lootcontainer>

 

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...
thats more for an admin, you need to place it manually (im using it at a lobby).

 

I might have weird taste, but I wanted this to enhance my singleplayer game, but putting those balls into the world without actually having to craft them feels like cheating. Do you think you could add recipes?

Link to comment
Share on other sites

  • 4 weeks later...
How do I remove one when I put it down?

 

By default, you can't do that, however you could change blocks.xml to turn the gamble items into pickable ones.

 

To do this, open blocks.xml and look for this line:

<property name="CanPickup" value="false"/>

and change it to:

<property name="CanPickup" value="true"/>

 

There are 3 lines, one for each gamble ball - gambleBronze, gambleGold, gambleDiamond, so you will have to change it for each ball individually. Next time you start the game, you will be able to pick them up and place them anywhere else you want. If you play multiplayer, once you place them where you really want them to be, I suggest you to change these lines back to false to prevent other players from picking them up.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...