Legends of Runeterra

Legends of Runeterra Dev Tracker




06 Mar


03 Mar


02 Mar


01 Mar

Comment

Originally posted by Nerfeveryone

😳 Verified Rioter moment

Plus the design lead for the features team, which includes Path right now. :)

Comment

Originally posted by Barney_Johnson

Question how many references to LoR do you make in your day? Outside of anything based on LoR

Not enough.

Comment

Originally posted by Nerfeveryone

Freljord’s never getting unlocked in Path of Champions huh?

I remember when folks were insisting we'd never release a 13th champion too. :)

Comment

That’s a very lonely poro

Comment

Originally posted by MasterCookieShadow

you did the joke again ;-;

And I will again and again until my demands are met.

Tell the people what you have seen today.


28 Feb

Comment

Are you saying you think this change is...

An atrocity?

;)


27 Feb

Comment

Originally posted by massivebacon

Oh wow this is great, thank you so much! I think I'm getting a better sense of how you handle things. I think my final question is mostly about passing state back to the game. You mention call game.Draw() type things, but if you're setting values and counters and such on cards through scripting, presumably you have some ability to know those things have changed so you can trigger animations and such. If you aren't using C# properties but are setting field values on objects, how are you triggering events and interactions? Are you calling something like game.UpdateCountersForCards() after every equivalent gameplay action, or do you pass back some sort of update blob?

Thanks!

In general we try to keep our card scripts relatively simple so that designers can write/read them well - so in the game.Draw() case, that function call handles all of the necessary gameplay events associated with drawing a card and there is no need for the card scripting to trigger everything relevant gameplay action.

Just to be clear - calling game.Draw() results in the execution going back to C# (i.e. out the scripting layer and back into the engine layer). That could totally trigger more events that cards could also have callbacks for. Some made up examples of potential events triggered as a result of calling game.Draw():

  • "CardHasBeenDrawn"
  • "CardHasEnteredHand"
  • "GameIsOver" if overdraw happens, etc...

So event processing becomes a stack because events can trigger more events. Say CardABC has text like "summon CardXYZ when I'm summoned" and there is Card123 that is "When an enemy is summoned, destroy me, then grant it Vulner...

Read more

26 Feb


25 Feb

Comment

Originally posted by massivebacon

Hello! I return to this article often and saw that you were on Reddit and I'd love to ask a few questions. I'm really into the approach mentioned here and am looking to do something similar in a future game and would love more info:

  • Do you have multiple scripts attached to a given card?
  • Are the shared code libraries you mention in the post "plain" python or are they cards themselves? How are they actually shared?
  • How do you handle emitted C# events to "Bind" to the events in Python?
  • Is it just one event per script or do scripts have multiple event "listeners"?
  • Do you allow branching in scripts? Sort of related, how much state is passed to each card, and how do cards manage who gets to control state at a given moment?
  • Are you using lots of C# Properties for listenable state change or do you update state after the whole card is executed. In the duration example for example, does setting the duration kick off UI update or do y...
Read more

Glad you enjoyed the article! I can try to answer some of these questions!

  • Cards can definitely have multiple scripts attached, they can end up with quite a few actually.
  • Those shared libraries are "plain" python - just simply centralized functions with no state (other than the parameters passed in) that are helpful in not having to copy/paste the code everywhere.
  • The event flow is probably a little sensitive, but the gist is that we parse the python files and save "which C# events should trigger which python code" so that we can leverage that knowledge when the C# event fires.
  • "Script" gets a little overloaded as term :) A single python file is authored for a card, and there can be multiple event listeners/callbacks in that single file, but during the parsing I mentioned above we store information so that it is essentially one event per "script". So a card that listeners to multiple events, while authored in a single python file,...
Read more

24 Feb


23 Feb