___________________________________________________________________________________________________________________________
This framework uses Content Patcher to designate custom particle effects to:
Since Content Patcher allows for its own customization, the above can be more finely-tuned to, e.g. time, day, season, etc.
Creating Particle Effects
Content Patcher syntax should be something like:
{ <br /> "Action": "EditData", <br /> "Target": "Mods/aedenthorn.ParticleEffects/dict", <br /> "Entries": { <br /> "aedenthorn.CPParticleEffects/heartCat": { <br /> "type":"object", <br /> "name":"Statue Of Endless Fortune", <br /> "movementType":"random", <br /> "movementSpeed": 1, <br /> "frameSpeed": 0.05, <br /> "acceleration":0, <br /> "minRotationRate":0.05, <br /> "maxRotationRate":0.05, <br /> "particleWidth":11, <br /> "particleHeight":10, <br /> "fieldOuterWidth": 128, <br /> "fieldOuterHeight":256, <br /> "fieldOffsetY": -32, <br /> "belowOffset": 0.001, <br /> "aboveOffset": 0.001, <br /> "minParticleScale": 2, <br /> "maxParticleScale": 2, <br /> "particleChance": 0.1, <br /> "maxParticles": 20, <br /> "minLifespan": 80, <br /> "maxLifespan": 160, <br /> "spriteSheetPath": "Mods/aedenthorn.ParticleEffects/heart", <br /> } <br /> } <br /> }, <br /> { <br /> "Action": "Load", <br /> "Target": "Mods/aedenthorn.ParticleEffects/heart", <br /> "FromFile": "assets/heart.png" <br /> }
Don't change "Target", that's the mod's dictionary path.
The entry key must be unique.
Value fields:
Textures
Your sprite sheets should be created with frames horizontally and alternatives vertically.
So, say your particles are 3x3 pixels each, each particle has ten frames, and there are five alternative sprites to choose from for each particle, then your sprite sheet texture should be 30x15 pixels in size: ten frames across x five alternatives down.
The mod will choose an alternative randomly for each particle if there are multiple alternatives.
API
There is a SMAPI API you can use in other SMAPI mods. The methods you can access are:
public void BeginFarmerParticleEffect(long farmerID, string key);
public void EndFarmerParticleEffect(long farmerID, string key);
public void BeginNPCParticleEffect(string npc, string key);
public void EndNPCParticleEffect(string npc, string key);
public void BeginLocationParticleEffect(string location, int x, int y, string key);
public void EndLocationParticleEffect(string location, int x, int y, string key);
public List GetEffectNames();
x and y are pixel positions on the map.
Notes
There's an example pack in the files section.
About Project
Created: September 6th 2023
Updated: September 6th 2023
Project ID: 32492
License: All Rights Reserved
__________________________________________
Game Versions:
1.01.03
1.01.03
1.01.03
1.01.03
1.01.03
__________________________________________
Flavors:
WoW Retail
__________________________________________
Categories
Companions
Battle
__________________________________________
Main File
September 6th 2023
__________________________________________
Recent File
September 6th 2023
__________________________________________
Members
__________________________________________
Report