Cube Chaos
คะแนนไม่เพียงพอ
XenoLib
   
รางวัล
ชื่นชอบ
ชื่นชอบแล้ว
เลิกชื่นชอบ
ขนาดไฟล์
โพสต์
อัปเดต
326.319 KB
4 ก.พ. 2024 @ 5: 35am
6 ต.ค. 2024 @ 2: 46pm
11 หมายเหตุการเปลี่ยนแปลง ( ดู )
คำอธิบาย
XenoLib


You might be here for one of several reasons:
  • A mod asked you to download this/had this as a requirement
  • You saw this mod in the workshop and wanted to know what it was
  • You are a modder trying to use this library
If you are here for the first reason then the following is for you:
Troubleshooting
Having issues? Getting errors?
  1. Make sure that XenoLib is located ABOVE any mods that require it and below any base-game "mods"
  2. Check if the mod using XenoLib is causing issues by unloading it while still having XenoLib loaded.
  3. If the previous 2 do not work, you can ping me in the cube chaos discord #modding-help channel



What is this "mod"
This mod is a library that contains useful abilities, values and actions that modders can use in their own mods.
Basically, this mod adds no content by default.



For modders
If you want to use this library for your own mods, install it and unload all other mods. Load XenoLib, and now there is an important step: removing ModdingInfo.txt

What is ModdingInfo
If you dont know what ModdingInfo.txt is, it is generated inside of your cube chaos local file directory when you click "Create Modding Help". It contains all compounds the parser can find, like doubles, AI booleans, actions and abilities, along with the values they take in. Since you do not know what this file is, i will assume that it is not in your Cube Chaos directory, but if it is then delete it
(it will be located under [any drive, commonly C: or D:]\steam\steamapps\common\Cube Chaos)

I have ModdingInfo already
Since you already know what moddinginfo is, go ahead and delete it. Now once its been deleted, unload all mods and load XenoLib and then after a restart, generate the moddinginfo. It will now also contain all custom compounds added by XenoLib and you are ready to use the library.

Compound List
Below are all the added compounds, the values they take in and what they do. Keep in mind that this might be outdated.

Actions
  • AddCubeDepthRow CUBE \ Adds a row at the bottom of the map (just like default terrain generation) with a cube of choice.
  • SetMaxHp DOUBLE \ Sets the max hp of Target to a specified double. It is recommended to use Silent with this as it uses ChangeMaxHp, and certain abilities/perks might mess with this action.
  • SetManaCost DOUBLE \ Same as SetHp but changes the mana cost instead.
  • NegateEvent \ Same as NegateX EventAmount. Shorthand.
  • Else \ Same as Then, just for nicely forming IfElse code like this: IfElse *bool* Then Action Else Action
  • FactionXSetsManaToY \ Changes the mana of faction X to be Y.
  • EveryCubeTouchingThis \ Shorthand for EveryCubeTouchingPosition PositionOfThis.
  • HealToMaxHp \ Heals the target to its MaxHp.
  • CreateCubeInDirection \ Shorthand for CreateCubeOnPosition Cube PositionInDirectionFromThis Direction
  • TripleAction \ Shorthand for Both Both Action Action Action
  • QuadrupleAction \ Shorthand for Both Both Both Action Action Action Action
  • CreateCubeOnEveryPositionTouchingThis \ Creates a cube on every touching position.

Abilities
  • FlightTimeX TIME \ Gives the affected cube Flying for X ticks.
  • ExplosiveRadiusXRadiusYDamageZParticleRadius DOUBLE DOUBLE DOUBLE \ On death, in a radius of X deal Y damage to those cubes with particles in a radius of Z.
  • ManaGenOnKillMaxHpDivByX DOUBLE On kill the affected cube generates mana equal to the max HP of the killed cube divided by X.
  • OnlyDamageNeutral \ Makes the cube unable to deal damage to anything but neutral cubes. (should account for strength to but any other damage modifiers applied in BeforeThisDealsDamage might conflict.
  • CantDamageNeutral \ Makes the cube unable to deal damage to neutral cubes. (accounts for strength, other BeforeThisDealsDamage damage modifiers might conflict.)
  • CantDamageLeaders \ Makes the cube unable to deal damage to leader cubes. (accounts for strength, other BeforeThisDealsDamage damage modifiers might conflict.)
  • CantDealDamage \ Makes the cube unable to deal damage to cubes. (accounts for strength, other BeforeThisDealsDamage damage modifiers might conflict.)
  • TrueSingleUse \ After a cube with this ability is created exile all cubes with the same name from the hand of the faction that created it. (recommended not to use with the perk that makes all cubes have all names)
  • ClimbingX DOUBLE \ Same as Climbing, but has a value and repeats the climb X times. (I.E. ClimbingX 3 can climb 3 high walls)
  • Sharing \ Before this heals, halve the healed amount and heal that same amount (the halved amount) to all touching allies.
  • Linked \ Before this takes damage, halve the damaged amount and deal 1/4th of the initial damage to all touching allies.
  • Pushing \ Before a cube collides with this, this tries to move in the same direction as the cube that is about to move into it. (physics perk but as an ability)
  • HealOverflow \ Before this heals, if the amount healed would exceed this cubes max HP then heal a random damaged ally equal to the amount of health that would be healed exceeding this cubes max hp.
  • HFlipped \ This cubes sprite is horizontally flipped.
  • VFlipped \ This cubes sprite is vertically flipped.
  • HoveringX \ Hovers with X space in between the cube and the floor. Also accounts for spatial changes.

Booleans
  • AiNeverPlace \ Same as doing AiPlacementRule: False, but instead you do AiPlacementRule: AiNeverPlace.
    Mainly useful for readability for people newer to modding.
  • CubeHasAbilityWithName \ Same as HasAbilityWithName, just a more readable name that shows it uses Cube and Name in that order.

Doubles
  • PlayerFaction \ Always 1. Mainly for readability in any script that does something with faction numbers.
  • EnemyFaction \ Always 2. Mainly for readability in any script that does something with faction numbers.
  • NeutralFaction \ Always 0. Mainly for readability in any script that does something with faction numbers.
  • Modulo DOUBLE DOUBLE \ Same as % DOUBLE DOUBLE but more readable.




Adding Mod Requirement
This step is very important as it makes your mod have a requirement to download XenoLib. Without this, someone might download your mod standalone and get a bunch of errors.
Follow the 2 steps:
STEP 1 [imgur.com]
In your mods configuration, find the "Add/Remove Required Items" option and click it.
STEP 2 [imgur.com]
Make sure you are subscribed to XenoLib, then head to "Subscribed Items" and select XenoLib.
Now select "Save And Continue" and you are all set!

Modders, feel free to suggest compounds in the discussions tab (on top next to description).
กระดานสนทนายอดนิยม ดูทั้งหมด (1)
0
25 มิ.ย. 2024 @ 10: 06am
ถูกปักหมุด: XenoLib Suggestions
Xenobeam
2 ความเห็น
Ragin' Ramen 4 มิ.ย. 2024 @ 5: 38pm 
*perplexed ogaboooga noises*
Klelik 5 มี.ค. 2024 @ 4: 31pm 
Action: EveryCubeTouchingThis ACTION / Simplified version of EveryCubeTouchingPosition PositionOfThis

Action: HealToMax / Heal target cube to its max hp: HealXDamage Subtraction MaxHpOfCube Target HpOfCube Target

Action: OffsetByX TIME / Offset the activation of a timed ability by X. Great for having two timed abilities not overlap.