Replies: 13 comments
-
Do we need the author field? What happens if another person edits the script to add new functions for new or improved cheevos? |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
@leiradel |
Beta Was this translation helpful? Give feedback.
-
What if a third person modifies the script? Wouldn't it be better to just add you nick as a comment in the code? |
Beta Was this translation helpful? Give feedback.
-
@leiradel |
Beta Was this translation helpful? Give feedback.
-
Sure, I just don't get why save this info. It doesn't tell the history of changes. I'm probably just missing something though. |
Beta Was this translation helpful? Give feedback.
-
history will be stored independently from that, including the contents (to show diffs) - the single entry can be understood as latest snapshot then. the column could be named |
Beta Was this translation helpful? Give feedback.
-
The design of that table I proposed in the OP was highly influenced by the current existing tables. I didn't spend much thinking on it because having a definitive solution is not that important. It's just for tests. When RAWeb V2 become a reality we can spend more time thinking on a better design. |
Beta Was this translation helpful? Give feedback.
-
How is this going to work from the clients perspective? Right now rcheevos assumes all Lua functions are implemented in one script file, and regular cheevos use a new Lua operand type in the This is incompatible with having a different kind of cheevo in the database for Lua cheevos. |
Beta Was this translation helpful? Give feedback.
-
If I understood correctly, the way rcheevos is managing Lua scripts for cheevos is in accordance with what we discussed on discord, and I think that's fine. The implementation I envisage (abstracting many details):
@leiradel is it enough for your question or do we need to discuss more details? (by the way, maybe @Jamiras can also share some thoughts here) |
Beta Was this translation helpful? Give feedback.
-
Will the two files, the JSON and the Lua script, be somehow packed, say ZIP, to be returned by the same request? I'd rather have the Lua script embedded in the JSON, or two separate requests i.e. |
Beta Was this translation helpful? Give feedback.
-
I'm thinking in something like this: {
"Success": true,
"PatchData": {
"ID": 1,
"Title": "Sonic the Hedgehog",
"ConsoleID": 1,
"ForumTopicID": 112,
"Flags": 0,
"ImageIcon": "/Images/016743.png",
"ImageTitle": "/Images/000009.png",
"ImageIngame": "/Images/000010.png",
"ImageBoxArt": "/Images/016727.png",
"Publisher": "SEGA®",
"Developer": "SEGA®",
"Genre": "Platformer",
"Released": "June 23, 1991",
"IsFinal": false,
"ConsoleName": "Mega Drive",
"RichPresencePatch": "...",
"LuaScript": "===== L U A S C R I P T C O N T E N T =====",
"Achievements": [
{
"ID": "..."
}
],
"Leaderboards": [
{
"ID": "..."
}
]
}
} what do you think? |
Beta Was this translation helpful? Give feedback.
-
I was assuming something along those lines as well (returned inside the PatchData). |
Beta Was this translation helpful? Give feedback.
-
@luchaos
This is the first approach I had in mind for a Lua script database table:
[EDIT: at a second thought the concept below isn't enough. Let's discuss a better approach later]
LuaScript
ID
- int(10) unsignedGameID
- int(10) unsignedAuthor
- varchar(32)DateCreated
- timestampDateModified
- timestampModifiedBy
- varchar(32)Script
- ?? (textfile)(I'm not sure how pure textfiles are stored in the database. Is it just a varchar with high limit?)
NOTE: As far as I understood, there is not a big concern to design a definitive implementation. The RAIntegration devs (@Jamiras and @leiradel) just need some kind of interaction with the server for the first development tests. We don't plan to release this feature before RAWeb 2.
They will need something like
uploadlua
indorequest.php
to upload Lua scripts, and maybe we should makepatch
return the Lua script amongst the other data.But if you take care of the database table creation, I can code the requests.
Beta Was this translation helpful? Give feedback.
All reactions