Skip to content

do regular swap when baseFormID1,baseFormID2|swapFormID|etc#11

Merged
powerof3 merged 1 commit intopowerof3:masterfrom
NickStefan:multi-swap-2-pr
Jul 13, 2024
Merged

do regular swap when baseFormID1,baseFormID2|swapFormID|etc#11
powerof3 merged 1 commit intopowerof3:masterfrom
NickStefan:multi-swap-2-pr

Conversation

@NickStefan
Copy link
Copy Markdown
Contributor

@NickStefan NickStefan commented Jul 10, 2024

Add on to #10

After this PR the following examples should be true:

origBaseID,origBaseID2,origBaseID3|swapBaseID|propertyOverrides|chance
-> swaps all of the origBaseIDs with swapBaseID

origBaseID,origBaseID2,origBaseID3|swapBaseID,swapBaseID2,swapBaseID3|propertyOverrides|chance
-> randomly assigns each origBaseID to one of the swapBaseIDs

origBaseID,origBaseID2,origBaseID3|swapBaseID1,swapBaseID2|propertyOverrides|chance
-> logs an error. The swapBaseID set needs to either be a size of 1 or be equal/greater than the baseFormID set.


Test case

[Forms]
; swaps everything left of `|` with an AlphaTest
BleakFallsTorchlight01,BleakFallsTorchlight01NS,BleakFallsDraugrTorch01,BleakFallsDraugrTorch01NS,BleakFallsCandleLight01,BleakFallsCandleLight01NS,BleakFallsDraugrTorch01Spot,BleakFallsDraugrTorch02,BleakFallsDraugrTorch02ns,BleakFallsDraugrTorch01NS_MoveLess,BleakFallsDraugrTorch01_HalfOmni,BleakFallsCandleLight01_Flicker,BleakFallsCandleLight01NSDesat,BleakFallsCandleLight01NSDesat,BleakFallsCandleLight01NSTESTTEST,BleakFallsDraugrTorchDesat01|AlphaTest

; randomly assigns swaps for so that each item left of `|` gets one swap from the right of `|`
DoomstoneWarrior,DoomstoneMage,DoomstoneThief,DoomstoneLady,DoomstoneApprentice,DoomstoneLover,DoomstoneSteed,DoomstoneAtronach,DoomstoneShadow,DoomstoneLord,DoomstoneRitual,DoomstoneTower,DoomstoneSerpent|DoomstoneWarrior,DoomstoneMage,DoomstoneThief,DoomstoneLady,DoomstoneApprentice,DoomstoneLover,DoomstoneSteed,DoomstoneAtronach,DoomstoneShadow,DoomstoneLord,DoomstoneRitual,DoomstoneTower,DoomstoneSerpent|NONE|chanceR(100,350)

@powerof3 powerof3 merged commit 258acc9 into powerof3:master Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants