Tabletop Simulator

Tabletop Simulator

Far Away [Scripted]
Samuelw  [开发者] 2024 年 5 月 11 日 上午 5:15
Bugs:
Please post bugs here.
< >
正在显示第 1 - 15 条,共 23 条留言
TechnicolorLover 2024 年 5 月 26 日 下午 7:28 
Great mod! I have only explored a small fraction of the game, but here are a few things I've noticed thus far:

1) There is an error on dropping building cards on hexes. Looking at the code, the function "hex_place_card" has broadcast functions with "dropped_object.getName()" but the code should refer to "card.getName()".

2) Adding damage on buildings throws an error if the Perimeter Shield card is in a deck. Just need to add an extra "if perimeter_shield ~= nil then" before doing a ray_scan in the update_damage function.

2.5) Destroying a building just unlocks the card, but perhaps have it automatically run the return object function. Just an extra keypress, but might avoid any confusion about what's supposed to happen to a destroyed building.

3) Some of the button tooltips are wrong. In particular, the CARES Report green buttons for socialize and view token are wrong. Also, the "Roll 2 Spawn dice" says "right click to remove button" but right clicking doesn't work.

4) On that note, the spawn dice button should probably be re-worded since it only rolls one set of dice at a time. As the button is worded makes it seem like you only push it once per round and it rolls twice for you. Not a bug, just some confusion on my end.

5) As a feature request, rather than a bug fix, would you be able to add an option for the AI module for creature behaviour? The module is on the game's website. If not actually scripting the dice rolls, at least add the cards and have them placed at the ECO System for easy reference.

6) As a simpler feature request, a button (perhaps only appears when both action cubes are at "3") that adds 1 hunger and 1 loneliness to each player and resets the action cubes. 1 keypress instead of 6.

7) The mission contracts PDF pushes into the instruction manual when opened. Just move the mission pdf further away, or above/below.

8) The mineral "cube" is actually a bag, which makes it harder to pick up and move manually and potentially allows for objects to accidentally fall into them.

9) Completing Explorer Record 1-C adds the Analytics Lab and the Perimeter Shield but not the Power Grid Converter. (i haven't checked all of them).

10) Not a bug, but consider having it so that once the Explore Die is resting and the rest of the explore routine is running, move the explore die up, or off to one side or something, so that it never gets bumped around by whatever is getting added (particularly creature tokens)

Hope that helps! If I find anything more I'll let you know.
Samuelw  [开发者] 2024 年 5 月 29 日 下午 6:45 
Thanks! I appreciate all the notes and details. I'll get them updated soon.
Samuelw  [开发者] 2024 年 5 月 30 日 下午 12:59 
Updated module with MOST of the items above. (5 Scripted AI Module is not added but I did add the cards and rules near the ECO System card.

Moving the Turn Sequence Cylinder was already doing the end of turn/start of turn actions. But I added buttons to make it easier. (Note: Hunger increase and action reset occurs on different steps of turn sequence in scripting.)

Thanks again for all the suggestions and bug notices.
TechnicolorLover 2024 年 5 月 30 日 下午 3:37 
Thanks for the quick fixes. I didn't appreciate the cylinder was scripted in any way, so that's my bad.

I'll have another look soon and let you know if I find anything more.
TechnicolorLover 2024 年 5 月 30 日 下午 6:12 
Still getting the error on dropping building cards.

Specifically, the error is

"Error in Script (Global) function <onObjectDrop>: chunk_3:(187,26-109); attempt to index a nil value".

As mentioned above, the issue is that line 187 refers to "dropped_object.getName()" but it should say "card.getName()". Same is true for line 189. I made the fix to a local save and it worked perfectly so it should be a simple fix. Feel free to message me if you're not able to reproduce the issue.
TechnicolorLover 2024 年 5 月 30 日 下午 6:20 
One other minor "bug" - the snap points for the gear cards need to have the tag "Artifact" as well, as the artifact cards currently don't snap to them.
TechnicolorLover 2024 年 5 月 30 日 下午 6:46 
Also, I think the creature spawning code is off, but admittedly it's a little confusing.

In my situation, I had a creature in Den-3 (Vomo Ranae), and there was a Den-3 card on the map. I rolled a "Den - 3" on the spawn dice. By my reading of the rules, it should spawn a creature at the den. But it said "Den 3 not available. Switching to Wandering 3" and spawned a new wandering creature.
最后由 TechnicolorLover 编辑于; 2024 年 5 月 30 日 下午 7:32
Samuelw  [开发者] 2024 年 5 月 30 日 下午 7:06 
Exactly. (except I also had positionToWorld/positionToLocal error just above that also.) Fixed.
TechnicolorLover 2024 年 5 月 30 日 下午 7:50 
Ah, so it was also a position issue - I wasn't sure. I tried it locally and fixing the tag wasn't enough, so i edited my comment.

Tested it just now and both issues are now fixed, except I still think the Den spawn code isn't quite matching the rules as written.

Say I have a Den 2 creature, but no Den 3 creature, and then I roll a Den 3 on the spawn dice.

I understand the rule to be that you treat it as an asterisk, meaning I choose any other already-filled slot (i.e. Den 2) and call that creature.

But your code just has it say no den and summons a wandering creature.

As I read the rules, the only time a Den roll should default to a Wandering roll is if *all 4 Den slots* are empty, not just the one rolled.
TechnicolorLover 2024 年 5 月 30 日 下午 8:01 
Also you didn't update the Gear snap points to also have the "Artifact" tag :)
TechnicolorLover 2024 年 5 月 30 日 下午 8:05 
Also also, if you remove a Den/Wandering button by right clicking it away, the button doesn't come back on "Reset Game". You have to reload the whole mod. Not sure if that's intentional?
TechnicolorLover 2024 年 5 月 30 日 下午 8:28 
btw, the code for pulling the AI cards on to the creature card is by adding the following at the end of newcreature_callback:

local aiList = getObjectFromGUID('c4857e').getObjects() aiPos = object.positionToWorld({0, 36.998, 0.4}) for x= #aiList, 1, -1 do if aiList[x].name == targetname then getObjectFromGUID('c4857e').takeObject({ position = aiPos, rotation = rot, smooth = false, index = x-1, }) end end

You just have to change the AI deck's scale to "0.95, 1, 0.95". You also have to make sure the names match - Fuzzbuttus is spelt wrong on the AI card :)
最后由 TechnicolorLover 编辑于; 2024 年 5 月 30 日 下午 8:29
Samuelw  [开发者] 2024 年 5 月 31 日 下午 3:27 
Thanks!

1. Which board are you having the Gear/Artifact tag issue? I thought I fixed it, but maybe we aren't talking about the same board/snap points.
2. I'd like to spend more time on the AI Card features, but I'm unavailable for a week. I should
3. The buttons are created unload, you can recreate it by using the 'y' game key to remove a card from the slot. (Or reload the game). Reset doesn't reset the buttons.

Rules page 19:
CREATURE SPAWNING
Every ROUND, roll 2 Spawn DICE and 2 Selection DICE. Each Spawn DIE can add a
Den Creature, a Wandering Creature , or do nothing.

Den Creature
1. If there is a filled den card, place the closest creature.
2. if *, chose a filled den card and place creature.
3. if card is blank, then chose any available den creature. (boo)
4. Select a wandering creature instead.

Yep. that will need re-scripted too.
TechnicolorLover 2024 年 5 月 31 日 下午 7:07 
1. I was referring to the two snap points below the green "Gear" slot on each player's CARES card - i.e. where you'd equip an artifact. I can't attach a screenshot, but hopefully that's clear enough.

I just checked the mod again (caching off) and it's still missing tags for both White and Brown.

2. No rush - I don't think it makes sense to try and actually script the actions of the creatures. That would be ridiculously labor intensive and create lots of edge cases and eliminate any room for roleplay. I'm thinking:
- have a button (by the mission selections?) that toggles whether AI cards are used.
- if toggled on, place the AI card when the ECO system card is first spawned, like with tokens (as with above code)
- when it becomes the creature's turn, the selection die for each placed card is rolled (I might suggest making temporary clones of the selection die and rolling all creatures at once, that way you can just do it once for all, instead of waiting for the player to finish one creature before rolling the next one. In fact I'd probably suggest using cloned dice for your explore action as well.)

The code doesn't even need to track what number is rolled for each creature. Just so long as it leaves the dice on the creature card, players can choose how to implement it (or even ignore it if they think it's unrealistic)

I don't think that should be too difficult to code (he says as someone who couldn't implement half of what you've already done) - just run a ray_scan on each ECO slot, and if it hits a card, spawn a temporary dice above the card and roll it. Have the temporary dice get deleted with the Advance Time button.

3. Yep, sorry. Your script skips step 3.

Option 1 - code it to check all other den slots if no card in the chosen slot, if it finds one do the asterisk function, if not then trigger the wandering creature.

Option 2 - code it so if there's no card in the chosen slot, broadcast a message that says "pick a different den creature if available. If not, add creature to Wandering Slot [selected_die]". Makes the player have to do a bit more work, but since the code doesn't actually put the creatures on the map anyway, player action is needed anyway.

Keep up the great work, and have a good week!
最后由 TechnicolorLover 编辑于; 2024 年 5 月 31 日 下午 7:08
Samuelw  [开发者] 2024 年 6 月 1 日 下午 8:06 
1. Updated Playerboard gear slots for Gear now also creates a snap point for Artifacts. (I also checked to make sure the 'take gear' will take artifact too.)

2. Added AI Scripting for Return and draw. Instead of a button, It checks if the deck if face/face down.
I prefer the Role Play of creatures because that is a unique aspect of Far Away. Therefore this module will always default to disabled. And I need to think about adding dice rolling to the AI Cards. Maybe I'll add a button to the AI cards unload of each card. But I'd prefer to minimize the AI module scripting. For now it will be a manual take and roll the AI dice.

While your script works, every time the deck is recreated it gets a new GUID. In VASSAL, you can designate a deck to always exist, even if it is empty. But in TTS, when the 2nd to last card is taken, it is no longer a deck.
Instead of using a static GUID, do a ray_scan(position, tags) to see if the deck is there, and then check if the deck is face up. I made the ray_scan function to easily scan a location for objects with tags x. It returns a list of objects, so you need to designate [1] to get the bottom object, or #objects to get the top item.

The bigger delay in updating the mod is making sure that the return code is updated for both AI card and for update the script when returning creature card to also return the AI Card..

• Interesting the AI card for Cibus Devorandom is misspelled on the AI card artwork. Oh well.

3. Fixed the code for Roll 2 spawn dice. :-D I just have it ray_scan each to check if Den1 to Den4 have a card. If so you get "player chose" message. If they are all blank, then it defaults to Wandering. :-D

Thanks for the feedback and notes!
最后由 Samuelw 编辑于; 2024 年 6 月 2 日 上午 4:01
< >
正在显示第 1 - 15 条,共 23 条留言
每页显示数: 1530 50