Giter Site home page Giter Site logo

Comments (6)

BottledByte avatar BottledByte commented on June 2, 2024

@tuomount I see you have already started offloading SpeechLines to JSON. You seem to use my old design I posted in #666, where file is treated as object.
I have to stop you there. Don't do that, for reasons mentioned above. I have tried it already and it is a bad direction.

I don't have much time lately, but I will look into the SpeechSet implementation when possible.
After all, I have functional one already 😄. It just has some design flaws and cannot handle the "ID problem".

But I would appreciate if you could fix that dichotomy between "behavior" and "text ID" in SpeechFactory.
Adding SpeechType like "ACKNOWLEDGE_WAR" might be sufficient. 👍
(and then slightly refactoring SpeechFactory)

Then, I will be able to put SpeechSets together much faster and in much better form.
I don't want to convert data back and forth, when I can prevent the situation by "doing it well from the start". 😐

from open-realms-of-stars.

tuomount avatar tuomount commented on June 2, 2024

Reason why I did the JSON first, I wanted to try it if it could work out, but then I noticed reading speeches in that format would not be easy that DataLoader. It would need to have extra class something like SpeechSet.

I can add add the ACKNOWLEDGE_WAR SpeechType.

from open-realms-of-stars.

BottledByte avatar BottledByte commented on June 2, 2024

but then I noticed reading speeches in that format would not be easy that DataLoader

Exactly, DataLoader is designed to work with objects. My design from #666 predates DataLoader... and it was done with jackson-jr 😄 . Plus there are issues with further extensibility of SpeechSet not-yet-defined class.

I can add add the ACKNOWLEDGE_WAR SpeechType.

👍
It is not possible to do this without it anyway. Or some other solution to the ID issue. 🙂

from open-realms-of-stars.

BottledByte avatar BottledByte commented on June 2, 2024

I have checked-out the changes, but the issue with "one ID for two texts" is still not fixed. TBH, I have no idea why the changes with ACKNOWLEDGE_WARE were done 😄, but having 2 IDs point to one text is completely OK. Might be used for flavor texts even.

However, the true issue is SpeechFactory.createAgreeWithWarLine(SpaceRace) method, as it's call is not paired with any "ID", but rather called ad-hoc in code. Also, it returns "SpeechType.AGREE". If it will be addressed by "ID" (SpeechType), the factory should return that SpeechType and code should accept it.

One more issue, in the same spirit of "I request A, I get B" is with Mechions and Synthdroids, which "alter" output of SpeechFactory.createDeclineAngerLine() from SpeechType.DECLINE_ANGER to SpeechType.DECLINE. This is unexpected behavior, and it violates several assumptions about SpeechFactory. And, which is the most problematic part, it causes SpeechFactory define behavior. This is another blocker to dehardcoding SpeechLines and should be remedied as well.

from open-realms-of-stars.

tuomount avatar tuomount commented on June 2, 2024

Okay, I did not first get what you meant by ACKNOWLEDGE_WAR. But yes, now createAgreeWithWarLine is called as any other speechline and has it's own type, which is ACKNOWLEDGE_WAR.

Removed also special thing that robots could not get angry.

from open-realms-of-stars.

BottledByte avatar BottledByte commented on June 2, 2024

Seems to work, closing.

from open-realms-of-stars.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.