Compare commits
No commits in common. "master" and "image-sync" have entirely different histories.
master
...
image-sync
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"separateMethodMetaAndSource" : false,
|
|
||||||
"noMethodMetaData" : true,
|
|
||||||
"useCypressPropertiesFile" : true
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
baselines
|
|
||||||
baseline: spec
|
|
||||||
<baseline>
|
|
||||||
spec
|
|
||||||
for: #common
|
|
||||||
do: [
|
|
||||||
spec package: 'RoloLudo'
|
|
||||||
]
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
projectClass
|
|
||||||
^ MetacelloCypressBaselineProject
|
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"commentStamp" : "",
|
|
||||||
"super" : "BaselineOf",
|
|
||||||
"category" : "BaselineOfRoloLudo",
|
|
||||||
"classinstvars" : [ ],
|
|
||||||
"pools" : [ ],
|
|
||||||
"classvars" : [ ],
|
|
||||||
"instvars" : [ ],
|
|
||||||
"name" : "BaselineOfRoloLudo",
|
|
||||||
"type" : "normal"
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
SystemOrganization addCategory: #BaselineOfRoloLudo!
|
|
@ -1 +0,0 @@
|
|||||||
(name 'BaselineOfRoloLudo')
|
|
@ -1 +0,0 @@
|
|||||||
{ }
|
|
27
README.md
27
README.md
@ -1,28 +1,3 @@
|
|||||||
# RoloLudo
|
# RoloLudo
|
||||||
|
|
||||||
Utilities for table top role playing, starting with [Ironsworn](https://www.ironswornrpg.com/),
|
Utilities for table top role playing, starting with Ironsworn.
|
||||||
[Starforged](https://www.ironswornrpg.com/product-ironsworn-starforged)
|
|
||||||
and [Firelights](https://firelights.farirpgs.com/).
|
|
||||||
|
|
||||||
To install it on Pharo/GToolkit first install [ExoRepo](https://code.tupale.co/Offray/ExoRepo)
|
|
||||||
and then run from a Playground:
|
|
||||||
|
|
||||||
```smalltalk
|
|
||||||
ExoRepo new
|
|
||||||
repository: 'https://code.sustrato.red/Offray/RoloLudo';
|
|
||||||
load.
|
|
||||||
```
|
|
||||||
|
|
||||||
The first utilities connect JSON oracles with the [502Lab wiki](https://mutabit.com/repos.fossil/502Lab/uv/wiki/502Lab.html#) to facilitate translations.
|
|
||||||
In the future it is expected to incorporate different utilities to make the game experience more fluid and minimalistic:
|
|
||||||
|
|
||||||
* [x] Virtual dice.
|
|
||||||
* [x] Querying of oracles and wiki.
|
|
||||||
* [ ] Bots connected to Telegram or other game channels.
|
|
||||||
* [ ] Querying and editing of character sheets.
|
|
||||||
|
|
||||||
**References**:
|
|
||||||
|
|
||||||
* [Dataforged](https://github.com/rsek/dataforged): Official Ironsworn: Starforged rules data in JSON, for use in community tools.
|
|
||||||
* [Datasworn](https://github.com/rsek/datasworn): JSON files of game data for the tabletop role-playing game Ironsworn, and its expansion, Ironsworn: Delve. For use in community-created tools, since it doesn't make sense to duplicate work on data entry.
|
|
||||||
* [Stargazer conversions](https://github.com/nboughton/stargazer_conversions): This project provides scripts to convert JSON content forged with rsek data to match the models used in the Stargazer project.
|
|
@ -1 +0,0 @@
|
|||||||
I represent a deck of cards. The terminology was taken from [Glossary of card game terms](https://en.wikipedia.org/wiki/Glossary_of_card_game_terms) in Wikipedia.
|
|
@ -1,10 +0,0 @@
|
|||||||
accessing
|
|
||||||
cards
|
|
||||||
| response |
|
|
||||||
response := OrderedCollection new.
|
|
||||||
self suits keysDo: [:suit |
|
|
||||||
(self numeralCards, self faceCards) do: [:number|
|
|
||||||
response add: number asString, suit.
|
|
||||||
].
|
|
||||||
].
|
|
||||||
^ response
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
faceCards
|
|
||||||
^ #( 'J' 'Q' 'K')
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
numeralCards
|
|
||||||
^ 1 to: 10
|
|
@ -1,6 +0,0 @@
|
|||||||
accessing
|
|
||||||
suits
|
|
||||||
^ { '♣' -> 'clubs' .
|
|
||||||
'♦' -> 'diamons' .
|
|
||||||
'♥' ->'hearts' .
|
|
||||||
'♠' ->'spades'} asDictionary
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
cards
|
|
||||||
^ self class cards
|
|
@ -1,6 +0,0 @@
|
|||||||
accessing
|
|
||||||
draw: card
|
|
||||||
self stock
|
|
||||||
detect: [ :each | each = card ]
|
|
||||||
ifFound: [self drawn add: card ]
|
|
||||||
ifNone: [ ^ nil ]
|
|
@ -1,6 +0,0 @@
|
|||||||
accessing
|
|
||||||
draw
|
|
||||||
| taken |
|
|
||||||
taken := self stock atRandom.
|
|
||||||
self drawn add: taken.
|
|
||||||
^ taken
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
drawAll: aCollection
|
|
||||||
self drawn addAll: aCollection
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
drawn: aCollection
|
|
||||||
drawn := aCollection
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
drawn
|
|
||||||
^ drawn ifNil: [drawn := OrderedCollection new]
|
|
@ -1,12 +0,0 @@
|
|||||||
accessing
|
|
||||||
printOn: aStream
|
|
||||||
super initialize.
|
|
||||||
aStream nextPutAll: 'Stock: ', String cr.
|
|
||||||
self class suits keysDo: [ :suit |
|
|
||||||
aStream
|
|
||||||
nextPutAll: (self stockCardsInSuit: suit);
|
|
||||||
nextPutAll: String cr.
|
|
||||||
].
|
|
||||||
aStream nextPutAll: 'Drawn: ', String cr.
|
|
||||||
self drawn do: [:card | aStream nextPutAll: card, ' ' ].
|
|
||||||
^ aStream contents.
|
|
@ -1,5 +0,0 @@
|
|||||||
accessing
|
|
||||||
reset
|
|
||||||
self drawn: OrderedCollection new.
|
|
||||||
self stock: self class cards.
|
|
||||||
^ self
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
stock
|
|
||||||
^ stock := self class cards copyWithoutAll: self drawn
|
|
@ -1,7 +0,0 @@
|
|||||||
accessing
|
|
||||||
stockCardsInSuit: aString
|
|
||||||
| response suitCards |
|
|
||||||
response := '' writeStream.
|
|
||||||
suitCards := self stock select: [ :card | card endsWith: aString ].
|
|
||||||
suitCards do: [ :card | response nextPutAll: card ].
|
|
||||||
^ response contents
|
|
@ -1,6 +0,0 @@
|
|||||||
accessing
|
|
||||||
uiCardsFor: aView
|
|
||||||
<gtView>
|
|
||||||
^ aView text
|
|
||||||
title: 'Cards';
|
|
||||||
text: [ self printString ]
|
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"commentStamp" : "<historical>",
|
|
||||||
"super" : "Object",
|
|
||||||
"category" : "RoloLudo",
|
|
||||||
"classinstvars" : [ ],
|
|
||||||
"pools" : [ ],
|
|
||||||
"classvars" : [ ],
|
|
||||||
"instvars" : [
|
|
||||||
"drawn",
|
|
||||||
"stock"
|
|
||||||
],
|
|
||||||
"name" : "DeckOfCards",
|
|
||||||
"type" : "normal"
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
dice: anArray
|
|
||||||
dice := anArray
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
dice
|
|
||||||
^ dice ifNil: [dice := Array new ]
|
|
@ -1,5 +0,0 @@
|
|||||||
accessing
|
|
||||||
printOn: aStream
|
|
||||||
super initialize.
|
|
||||||
aStream
|
|
||||||
nextPutAll: self dice printString
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
roll
|
|
||||||
^ self dice collect: [:each | each roll ]
|
|
@ -1,14 +0,0 @@
|
|||||||
accessing
|
|
||||||
uiDiceFor: aView
|
|
||||||
<gtView>
|
|
||||||
| response currentRoll dicePool |
|
|
||||||
response := '' writeStream.
|
|
||||||
currentRoll := self roll.
|
|
||||||
dicePool := self dice collect: [:each | each faces ].
|
|
||||||
response
|
|
||||||
nextPutAll: 'Dice: ', dicePool printString ; cr;
|
|
||||||
nextPutAll: 'Roll: ', currentRoll printString; cr;
|
|
||||||
nextPutAll: 'Sum: ', currentRoll sum asString.
|
|
||||||
^ aView text
|
|
||||||
title: 'Dice';
|
|
||||||
text: [ response contents ]
|
|
@ -1,4 +0,0 @@
|
|||||||
accessing
|
|
||||||
with: fistInteger with: secondInteger
|
|
||||||
|
|
||||||
self dice: (Array with: (Die with: fistInteger) with: (Die with: secondInteger))
|
|
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"commentStamp" : "",
|
|
||||||
"super" : "Object",
|
|
||||||
"category" : "RoloLudo",
|
|
||||||
"classinstvars" : [ ],
|
|
||||||
"pools" : [ ],
|
|
||||||
"classvars" : [ ],
|
|
||||||
"instvars" : [
|
|
||||||
"dice"
|
|
||||||
],
|
|
||||||
"name" : "DicePool",
|
|
||||||
"type" : "normal"
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
accessing
|
|
||||||
with: anInteger
|
|
||||||
^ self new
|
|
||||||
faces: anInteger
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
faces: anInteger
|
|
||||||
faces := anInteger
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
faces
|
|
||||||
^ faces
|
|
@ -1,5 +0,0 @@
|
|||||||
accessing
|
|
||||||
printOn: aStream
|
|
||||||
super initialize.
|
|
||||||
aStream
|
|
||||||
nextPutAll: self faces asString
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
roll
|
|
||||||
^ self faces atRandom
|
|
@ -1,9 +0,0 @@
|
|||||||
accessing
|
|
||||||
approaches
|
|
||||||
^ approaches ifNil: [
|
|
||||||
approaches := OrderedDictionary new
|
|
||||||
at: 'Strong' put: 0;
|
|
||||||
at: 'Patient'put: 0;
|
|
||||||
at: 'Quick' put: 0;
|
|
||||||
yourself
|
|
||||||
]
|
|
@ -1,6 +0,0 @@
|
|||||||
accessing
|
|
||||||
inventory
|
|
||||||
^ inventory ifNil: [
|
|
||||||
inventory := Dictionary new
|
|
||||||
at: 'vehicle' put: self vehicle;
|
|
||||||
yourself]
|
|
@ -1,3 +0,0 @@
|
|||||||
as yet unclassified
|
|
||||||
name: aString
|
|
||||||
name := aString
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
name
|
|
||||||
^ name
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
patient: anInteger
|
|
||||||
self approaches at: 'Patient' put: anInteger
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
patient
|
|
||||||
^ self approaches at: 'Patient'
|
|
@ -1,10 +0,0 @@
|
|||||||
accessing
|
|
||||||
printOn: aStream
|
|
||||||
super initialize.
|
|
||||||
aStream
|
|
||||||
nextPutAll: '- Name: ', self name; cr;
|
|
||||||
nextPutAll: '- Pronouns: ', self pronouns; cr;
|
|
||||||
nextPutAll: '- Approaches'; cr;
|
|
||||||
nextPutAll: ' - Strong: ', self strong asString; cr;
|
|
||||||
nextPutAll: ' - Patient: ', self patient asString; cr;
|
|
||||||
nextPutAll: ' - Quick: ', self quick asString; cr
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
pronouns: aString
|
|
||||||
pronouns := aString
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
pronouns
|
|
||||||
^ pronouns
|
|
@ -1,3 +0,0 @@
|
|||||||
as yet unclassified
|
|
||||||
quick: anInteger
|
|
||||||
self approaches at: 'Quick' put: anInteger.
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
quick
|
|
||||||
^ self approaches at: 'Quick'
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
relics
|
|
||||||
^ self inventory at: 'relics' ifAbsentPut: [ nil ]
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
strong: anInteger
|
|
||||||
self approaches at: 'Strong' put: anInteger
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
strong
|
|
||||||
^ self approaches at: 'Strong'
|
|
@ -1,6 +0,0 @@
|
|||||||
accessing
|
|
||||||
uiViewFor: aView
|
|
||||||
<gtView>
|
|
||||||
^ aView text
|
|
||||||
title: 'Character Info';
|
|
||||||
text: [ self printString ]
|
|
@ -1,4 +0,0 @@
|
|||||||
accessing
|
|
||||||
vehicle
|
|
||||||
"This should be replaced y a Vehicle inventory item, with fatigue status."
|
|
||||||
^ 'criocápsula móvil'
|
|
@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"commentStamp" : "",
|
|
||||||
"super" : "Object",
|
|
||||||
"category" : "RoloLudo",
|
|
||||||
"classinstvars" : [ ],
|
|
||||||
"pools" : [ ],
|
|
||||||
"classvars" : [ ],
|
|
||||||
"instvars" : [
|
|
||||||
"name",
|
|
||||||
"pronouns",
|
|
||||||
"inventory",
|
|
||||||
"approaches"
|
|
||||||
],
|
|
||||||
"name" : "FirelightsCharacter",
|
|
||||||
"type" : "normal"
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
characters
|
|
||||||
^ characters ifNil: [ characters := OrderedCollection new]
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
deck: anObject
|
|
||||||
deck := anObject
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
deck
|
|
||||||
^ deck ifNil: [ deck := DeckOfCards new]
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
dice
|
|
||||||
^ dice ifNil: [ dice := DicePool new with: 6 with: 6 ]
|
|
@ -1,10 +0,0 @@
|
|||||||
accessing
|
|
||||||
export
|
|
||||||
| response |
|
|
||||||
response := '' writeStream.
|
|
||||||
(STON writer on: response)
|
|
||||||
newLine: String lf;
|
|
||||||
prettyPrint: true;
|
|
||||||
keepNewLines: true;
|
|
||||||
nextPut: self.
|
|
||||||
^ MarkupFile exportAsFileOn: FileLocator temp / 'firelights.ston' containing: (response contents)
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
loadOraclesFromRepository
|
|
||||||
^ STON fromString: 'https://mutabit.com/repos.fossil/502Lab/raw/f0c299?at=oracles.ston' asUrl retrieveContents utf8Decoded
|
|
@ -1,18 +0,0 @@
|
|||||||
accessing
|
|
||||||
loadOraclesFromWikiTemplate
|
|
||||||
| oraclesTiddler rows |
|
|
||||||
oraclesTiddler := self wiki templateWiki tiddlers
|
|
||||||
detect: [:tiddler | (tiddler title) = 'Tablas Generadoras' ].
|
|
||||||
rows := oraclesTiddler text lines allButFirst collect: [:each | each splitOn: '|'].
|
|
||||||
^ rows collect: [:row | | tempDice |
|
|
||||||
tempDice := (row second splitOn: '"') second.
|
|
||||||
tempDice := tempDice splitOn: Character space.
|
|
||||||
tempDice := { tempDice first asNumber . tempDice second asNumber }.
|
|
||||||
OrderedDictionary new
|
|
||||||
at: 'dice' put: tempDice;
|
|
||||||
at: 'region' put: row third;
|
|
||||||
at: 'theme' put: row fourth;
|
|
||||||
at: 'event' put: row fifth;
|
|
||||||
at: 'past' put: row sixth;
|
|
||||||
yourself.
|
|
||||||
]
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
namesOracle
|
|
||||||
^ SfOracle new loadCharacterNames options
|
|
@ -1,4 +0,0 @@
|
|||||||
accessing
|
|
||||||
newMainCharacter
|
|
||||||
self characters ifEmpty: [ self characters add: FirelightsCharacter new].
|
|
||||||
^ self characters first.
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
oracles: aDictionary
|
|
||||||
oracles := aDictionary
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
oracles
|
|
||||||
^ oracles ifNil: [ oracles := self loadOraclesFromRepository]
|
|
@ -1,5 +0,0 @@
|
|||||||
accessing
|
|
||||||
queryOracles
|
|
||||||
| currentRoll |
|
|
||||||
currentRoll := self roll.
|
|
||||||
^ self oracles detect: [ :each | (each at: 'dice') = currentRoll ] ifNone: [ ^ currentRoll ]
|
|
@ -1,8 +0,0 @@
|
|||||||
accessing
|
|
||||||
randomName
|
|
||||||
| response|
|
|
||||||
response := self namesOracle.
|
|
||||||
^ {'Given name' -> (response at: 'givenNames') atRandom.
|
|
||||||
'callsign' -> (response at: 'callsigns') atRandom.
|
|
||||||
'Familiy name' -> (response at: 'familyNames') atRandom.
|
|
||||||
} asDictionary.
|
|
@ -1,4 +0,0 @@
|
|||||||
accessing
|
|
||||||
resetWorlMap
|
|
||||||
self worldMap: nil.
|
|
||||||
self deck reset.
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
roll
|
|
||||||
^ self dice roll
|
|
@ -1,11 +0,0 @@
|
|||||||
accessing
|
|
||||||
saveOracles
|
|
||||||
| fileName formats |
|
|
||||||
fileName := 'oracles'.
|
|
||||||
formats := {'ston' -> STON. 'json' -> STONJSON} asDictionary.
|
|
||||||
formats keysAndValuesDo: [:format :class |
|
|
||||||
MarkupFile
|
|
||||||
exportAsFileOn: (FileLocator temp / fileName), format
|
|
||||||
containing: (class toStringPretty: self oracles)
|
|
||||||
].
|
|
||||||
^ FileLocator temp
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
story: anObject
|
|
||||||
story := anObject
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
story
|
|
||||||
^ story ifNil: [ story := OrderedCollection new]
|
|
@ -1,13 +0,0 @@
|
|||||||
accessing
|
|
||||||
uiGameFor: aView
|
|
||||||
<gtView>
|
|
||||||
| response |
|
|
||||||
response := '' writeStream.
|
|
||||||
response
|
|
||||||
nextPutAll: '❭❭❭ Main Character'; cr; cr;
|
|
||||||
nextPutAll: self characters first printString; cr;
|
|
||||||
nextPutAll: '❭❭❭ Deck'; cr; cr;
|
|
||||||
nextPutAll: self deck printString.
|
|
||||||
^ aView text
|
|
||||||
title: 'Game';
|
|
||||||
text: [ response contents ]
|
|
@ -1,7 +0,0 @@
|
|||||||
accessing
|
|
||||||
wiki
|
|
||||||
|
|
||||||
^ wiki ifNil: [ wiki := TiddlyWiki new
|
|
||||||
name: 'Firelights/Vivarium games wiki';
|
|
||||||
template: 'https://vivarium.tiddlyhost.com/'.
|
|
||||||
]
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
worldMap: anObject
|
|
||||||
wordMap := anObject
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
worldMap
|
|
||||||
^ wordMap ifNil: [ wordMap := OrderedCollection new ]
|
|
@ -1,5 +0,0 @@
|
|||||||
accessing
|
|
||||||
worldMapDraw: aCardCollection
|
|
||||||
self deck drawn addAll: aCardCollection.
|
|
||||||
self worldMap addAll: aCardCollection.
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
accessing
|
|
||||||
worldMapDraw
|
|
||||||
| currentPlace |
|
|
||||||
currentPlace := self deck draw.
|
|
||||||
self worldMap add: currentPlace.
|
|
||||||
^ currentPlace
|
|
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"commentStamp" : "",
|
|
||||||
"super" : "Object",
|
|
||||||
"category" : "RoloLudo",
|
|
||||||
"classinstvars" : [ ],
|
|
||||||
"pools" : [ ],
|
|
||||||
"classvars" : [ ],
|
|
||||||
"instvars" : [
|
|
||||||
"deck",
|
|
||||||
"dice",
|
|
||||||
"wordMap",
|
|
||||||
"oracles",
|
|
||||||
"wiki",
|
|
||||||
"characters",
|
|
||||||
"story"
|
|
||||||
],
|
|
||||||
"name" : "FirelightsGame",
|
|
||||||
"type" : "normal"
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
I model a simple bot to automatize some tasks related with rolling oracles, character creation and playin in general.
|
|
@ -1,9 +0,0 @@
|
|||||||
accessing
|
|
||||||
newRandomPlayerCharacter
|
|
||||||
^ SfPlayerCharacter new
|
|
||||||
momentum: 2;
|
|
||||||
maxMomentum: 10;
|
|
||||||
momentumReset: 2;
|
|
||||||
health: 5;
|
|
||||||
spirit: 5;
|
|
||||||
supply: 5.
|
|
@ -1,11 +0,0 @@
|
|||||||
accessing
|
|
||||||
rollDice
|
|
||||||
"For the moment, I will model a dice roll in Ironsworn Starforged.
|
|
||||||
A more abstract vocabulary should be deviced allowing the roll of
|
|
||||||
dice pool"
|
|
||||||
|
|
||||||
^ OrderedDictionary new
|
|
||||||
at: 'challenge die (1):' put: 10 atRandom;
|
|
||||||
at: 'action die:' put: 6 atRandom;
|
|
||||||
at: 'challenge die (2):' put: 10 atRandom;
|
|
||||||
yourself.
|
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"commentStamp" : "<historical>",
|
|
||||||
"super" : "Object",
|
|
||||||
"category" : "RoloLudo",
|
|
||||||
"classinstvars" : [ ],
|
|
||||||
"pools" : [ ],
|
|
||||||
"classvars" : [ ],
|
|
||||||
"instvars" : [ ],
|
|
||||||
"name" : "LudoBot",
|
|
||||||
"type" : "normal"
|
|
||||||
}
|
|
@ -2,9 +2,5 @@ I model an asset of the Ironsworn Starforged Tabletop Roleplaying Game.
|
|||||||
|
|
||||||
More information at:
|
More information at:
|
||||||
|
|
||||||
[1] <https://www.ironswornrpg.com/>
|
[1] https://www.ironswornrpg.com/
|
||||||
[2] <https://www.kickstarter.com/projects/shawntomkin/ironsworn-starforged>
|
[2] https://www.kickstarter.com/projects/shawntomkin/ironsworn-starforged
|
||||||
|
|
||||||
I use as inspiration the data provided by @rsek at this repostory:
|
|
||||||
|
|
||||||
<https://github.com/rsek/datasworn>
|
|
@ -1,9 +0,0 @@
|
|||||||
accessing
|
|
||||||
collectionFromRepository: jsonFileUrl language: isoCode
|
|
||||||
| rawData |
|
|
||||||
rawData := STON fromString: jsonFileUrl asUrl retrieveContents.
|
|
||||||
^ rawData collect: [:assetDict |
|
|
||||||
(assetDict at: #Assets) collect: [ :assetSubdict |
|
|
||||||
self new fromDictionary: assetSubdict; language: isoCode
|
|
||||||
].
|
|
||||||
]
|
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
collectionFromRepository
|
|
||||||
^ self collectionFromRepository: 'https://raw.githubusercontent.com/rsek/dataforged/main/dist/starforged/assets.json' language: 'en'
|
|
@ -1,3 +1,7 @@
|
|||||||
accessing
|
accessing
|
||||||
asJsonTiddler
|
asJsonTiddler
|
||||||
|
<<<<<<< HEAD
|
||||||
^ self asTiddler asJson
|
^ self asTiddler asJson
|
||||||
|
=======
|
||||||
|
^ self asTiddler asJson
|
||||||
|
>>>>>>> master
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
converting
|
converting
|
||||||
currentAbilities
|
currentAbilities
|
||||||
|
|
||||||
^ self abilities at: 'enabled'
|
^ self abilities at: 'enabled'
|
@ -1,6 +1,6 @@
|
|||||||
accessing
|
accessing
|
||||||
fromDictionary: aDictionary
|
fromDictionary: aDictionary
|
||||||
name := aDictionary at: #Name.
|
name := aDictionary at: #Name.
|
||||||
category := ((aDictionary at: 'Asset Type') splitOn: '/') last copyReplaceAll: '_' with: ' '.
|
category := aDictionary at: #Category.
|
||||||
abilities := self populateAbilities: (aDictionary at: #Abilities)
|
abilities := self populateAbilities: (aDictionary at: #Abilities)
|
||||||
|
|
@ -1,12 +1,10 @@
|
|||||||
accessing
|
accessing
|
||||||
populateAbilities: abilitiesArray
|
populateAbilities: abilitiesDictionary
|
||||||
|
|
||||||
| enabled disabled |
|
| enabled disabled |
|
||||||
enabled := abilitiesArray select: [ :abi | (abi at: 'Enabled') = true ].
|
enabled := abilitiesDictionary select: [ :abi | abi keys includes: 'Enabled' ].
|
||||||
disabled := abilitiesArray select: [ :abi | (abi at: 'Enabled') = false ].
|
disabled := abilitiesDictionary reject: [ :abi | abi keys includes: 'Enabled' ].
|
||||||
^ self abilities
|
^ self abilities
|
||||||
at: 'enabled' put: (enabled collect: [:abi |
|
at: 'enabled' put: (enabled collect: [:abi | (abi at: 'Text') ]);
|
||||||
(WikiText new content: (abi at: 'Text')) convertMarkdownLinks ]);
|
at: 'disabled' put: (disabled collect: [:abi | (abi at: 'Text') ]);
|
||||||
at: 'disabled' put: (disabled collect: [:abi |
|
|
||||||
(WikiText new content: (abi at: 'Text')) convertMarkdownLinks ]);
|
|
||||||
yourself.
|
yourself.
|
4
RoloLudo.package/SfAssets.class/README.md
Normal file
4
RoloLudo.package/SfAssets.class/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
I model a collection of Starforged assets.
|
||||||
|
I use as inspiration the data provided by @rsek at this repostory:
|
||||||
|
|
||||||
|
https://github.com/rsek/datasworn
|
@ -0,0 +1,8 @@
|
|||||||
|
accessing
|
||||||
|
fromUrlString: aString language: isoCode
|
||||||
|
|
||||||
|
| rawData |
|
||||||
|
rawData := STON fromString: aString asUrl retrieveContents.
|
||||||
|
self items: ((rawData at: 'Assets') collect: [:assetDict |
|
||||||
|
SfAsset new fromDictionary: assetDict; language: isoCode ])
|
||||||
|
|
3
RoloLudo.package/SfAssets.class/instance/items..st
Normal file
3
RoloLudo.package/SfAssets.class/instance/items..st
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
accessing
|
||||||
|
items: anObject
|
||||||
|
items := anObject
|
3
RoloLudo.package/SfAssets.class/instance/items.st
Normal file
3
RoloLudo.package/SfAssets.class/instance/items.st
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
accessing
|
||||||
|
items
|
||||||
|
^ items ifNil: [ items := OrderedCollection ]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user