MSRevive / MSRevive/MasterSwordRebirth

Add trigger_changevalue from svencoop

Open
#227 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement 🔧 good first issue med priority
Dominant language
C++
Stars
22
Forks
16
Avg merge
5m
Merged PRs (30d)
1

Description

The FGD content to help explain what it should do.

// Change any entity keyvalue during runtime, allows set, basic arithmetic operations and bitwise logical operations (useful for flags)
@PointClass base(Targetname) color(90 215 60) = trigger_changevalue : "Trigger Change Value"
[
    spawnflags(Flags) =
    [

        // For Vectors:
        1 : "Don't use X" : 0
        2 : "Don't use Y" : 0
        4 : "Don't use Z" : 0

        32 : "Invert target value" : 0
        64 : "Invert source value" : 0

    ]
    target(target_destination) : "Destination entity"
    m_iszValueName(string) : "Destination key"
    m_iszNewValue(string) : "Source value"
    m_iszValueType(choices) : "Action" :  0 =
    [
        0 : "Replace (= source)"
        1 : "Add (= old + source)"
        2 : "Mul (= old * source)"
        3 : "Sub (= old - source)"
        4 : "Div (= old / source)"
        16 : "Pow (= old ^ source)"
        12 : "Mod (= old % source)"
        5 : "AND (= old & source)"
        6 : "OR (= old | source)"
        13 : "XOR (= old ^ source)"
        7 : "NAND (= !(old & source))"
        8 : "NOR (= !(old | source))"
        14 : "NXOR (= !(old ^ source))"
        11 : "Append (String concatenation)"
        17 : "Sin (= sin(source))"
        18 : "Cos (= cos(source))"
        19 : "Tan (= tan(source))"
        23 : "Cot (= cot(source))"
        20 : "Arcsin (= arcsin(source))"
        21 : "Arccos (= arccos(source))"
        22 : "Arctan (= arctan(source))"
        24 : "Arccot (= arccot(source))"
    ]
    m_trigonometricBehaviour(choices) : "Trigonometric funcs. I/O" : 0 =
    [
        0 : "Degrees in (out for arc.)"
        1 : "Radian measure in (out for arc.)"
    ]
    m_iAppendSpaces(integer) : "Append spaces (for strings)" : 0
    message(target_destination) : "Trigger after action"
]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating existing trigger entities and the FGD definitions in the MasterSwordRebirth source, then compare their implementation and key-value handling with the supplied trigger_changevalue definition. Use the listed actions, flags, trigonometric modes, and trigger target as the behavior checklist; done means the entity is available with those fields and operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.