Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Snarky

#361
Quote from: Jordanowen42 on Mon 13/05/2024 09:07:22I didn't write the code- it seems to be something AGS set up automatically.

Not likely. The only way that could happen "automatically" is if it was part of a template you chose when you started the project, or a module you imported. It's certainly not part of any standard template (since it is invalid AGS code), and if it was part of a (broken) module, it wouldn't appear in GlobalScript.

And in any case, if it had been there the whole time, you'd have had the same error the whole time. So almost certainly, you either wrote or edited this code, and simply forgot about it. (In your first forum post you mention using ChatGPT to test your code; this is the kind of invalid AGS code that ChatGPT might very likely generate, so I suspect you got it from there and copy-pasted it into your script.)

Edit: Unless you have something like the example struct Khris gave, the lines are probably nonsense, and I'd just delete them.
#362
Quote from: FortressCaulfield on Mon 13/05/2024 01:17:32For the first item, it was more a stylistic question as to whether it's normal to have a whole pile of bools and ints in global for trackers and stuff. My char has to learn 3 things before she can ask a char about the plot. Since those things are all in different room the only way to track them was global bools. I couldn't find any other way to do it.

Yes, in that case you do need global variables. But note that there are two kinds of global variables in AGS: you have the ones in the global variable pane, but you can also make a variable global by exporting it from a script (the global script or a module script, not a room script) and putting an import statement in the script header.

These are essentially equivalent (under the hood, the global variables pane is converted into a script with export/import statements), but using script variables gives you a bit more flexibility, since you can group related variables in arrays and structs. So, for example, some devs use a "GameState" script/struct where all the variables that keep track of game progress are stored.

Quote from: FortressCaulfield on Mon 13/05/2024 01:17:32I had thought of that, but couldn't figure out how to check score to potentially alter the graphic each time the gui was called.

Normally the way to do this is to create a function that updates the information and shows the GUI, and always call that function whenever you want it displayed. Or if you need to update the GUI while it is displaying, not just when you bring it up, you can have just an update function, and call that in repeatedly_execute(), for example.
#363
Quote from: LimpingFish on Sun 12/05/2024 01:32:0580s Europop:


The "creature of the night" bit really reminds me of another pick I posted a while back in the thread:

Quote from: Snarky on Sun 04/10/2020 12:58:40Oh, and just to add to the 80s vibe:

Laura Branigan - "Self Control"

For something completely different, I was taken by surprise today to learn that Tom Lehrer, born 1928, is still alive (as far as the Internet is aware, anyway), and still seems like a great guy. He put all his songs in the public domain and relinquished the copyright in 2020/2022.

Tom Lehrer - "Poisoning Pigeons in the Park"
#364
Stéphane Picq, who did the soundtrack to the classic 1992 Dune adventure/strategy game by Cryo, recently recovered the music copyright and has released a remastered version of the Dune Spice Opera soundtrack album.

There are a couple of tracks of the remaster on YouTube, but they're not among my favorites, so I'll just post a link to this unofficial mix of the original game music (combining Adlib, Adlib Gold and Roland MT-32 versions), in particular "Worm Intro" (aka. "Sign of the Worm") that plays over the intro sequence:

Stéphane Picq - Dune soundtrack
#365
I need to get around to that. I considered giving the first Montgomery Bonbon book to the daughter of a cousin for her sixth birthday, but I reckon she's a bit young for it still.

I was just reminded of a fantasy novel I read recently, K.J. Parker's Sixteen Ways to Defend a Walled City, and it made me think a bit about the mechanics of twists in fiction. The book has several good ones (including an ending I didn't see coming at all, to the point I had to jump back and read it over again), but what I think is especially clever is that they are sort of camouflaged behind more obvious twists: you see the "fakeout" twist coming, and it draws your attention and keeps you from anticipating the followup.

For example:

Spoiler
The book makes a big mystery of where the army that lays siege to the eponymous Walled City comes from, and who the brilliant military strategist who leads it is. But it's pretty clearly signposted that it is the protagonist's childhood friend, who appears in numerous flashbacks.

While readers wait for that reveal, we don't suspect that the innkeeper the protagonist keeps bickering with, the daughter of another old friend, whom he's been keeping an eye on since her parents died, is actually (unbeknownst to her) his own illegitimate daughter. What in retrospect turn out to be clues can easily be interpreted as hints of romantic tension, in another clever bit of misdirection.
[close]
#366
It's been a while since I played Wordle, but I recently started playing the NYT's other game, Connections. It's a bit more right-brain than Wordle: since the connection in a group can be anything, you have to use more creativity and leaps of intuition.

In some sense it's an easier game, but it's quite often that I can't figure out what the connection is in the final group (that you get for free by process of elimination).

Once I was left with BROWN, DOGS, UNCHAINED, FICTION:
Spoiler
Second words in Tarantino movie titles
[close]

And recently SIGHT, SOUR, SEN, SINE:
Spoiler
Numbers with the first letter replaced by S
[close]

I find it pretty enjoyable.
#367
Quote from: Crimson Wizard on Sun 28/04/2024 22:46:30If it's not possible to do the wanted effect with the above factor, then perhaps this feature may be amended.
I am just not sure how. If someone can suggest a good way to configure this (from design perspective), we would try implementing that.

I see two possible approaches:

1) Allow users to completely customize what sort of directional loops a character has and the range of angles each should be applied to, overriding the AGS defaults. (So, a user could for example define that loop 0 is left and loop 1 is right, and the others are unused, or set it up for movement on a hex grid.) There'd be some way to set this up in the IDE, for example as a property pane, or even a dedicated node with its own GUI to edit it visually. Ideally you would probably want to do this on a per-character basis (or maybe not?), but the complication is that views are independent of character, and the default directions are listed for each loop in the view.

Possibly this implies a complete rework of the way you set up walk animations in AGS, which might in any case be necessary if we want to enable other effects (like transitions in and out of walks, as people sometimes request). Maybe instead of numbered loops in a view, we might move towards a "tagged loop" system, where each loop is given a semantic label? Perhaps different view types/templates? It has always kind of annoyed me that all views have those 8 directional loops, even if the animations they store are not directional.

2) Remove the requirement for the left/right loops (or any particular directions) to be set for a character view. That way, to enable diagonal-only animations like @celadonk wants, you'd simply leave loops 0-3 empty and only set up loops 4-7. (And similarly you could have exclusive up/down animations by only using loops 0-1.) The internal GetDirectionalLoop() function in the engine would need to check which directions have valid loops, work out the range of angles each should cover, and set it appropriately.

Option 2 is somewhat less flexible, but seems a good deal easier, both for users and in terms of implementation. Though there might be some unexpected side-effects of removing the left/right loop requirement (why was it added in 3.0 in the first place?), and changing the way directions are selected would definitely break backwards compatibility for some games. (Which I think is good, since we want to move decisively to AGS 4!)

Edit:

Also, the MVP for the issue mentioned in the github thread, to return the list of waypoints (and the current segment) from the built-in pathfinder, would make scripting custom-made solutions much more viable.

Quote from: Crimson Wizard on Sun 28/04/2024 21:23:00Explanation of use here:
https://github.com/adventuregamestudio/ags/pull/2304
#368
Quote from: celadonk on Sun 28/04/2024 16:15:05I've put together a block of code, but it seems like putting anything in on_mouse_click() nullifies the movement-- I'm only getting the animation.

You'll need to also make an explicit call to the Character.Walk() function, if you aren't already.

Quote from: celadonk on Sun 28/04/2024 16:15:05Is it possible to set this animation scheme up without connecting it to an input?

No, I'm afraid I can't see any way of setting it up statically. The basic walkcycle directions are hardcoded into AGS, and in order to use a different setup, you have to actively calculate the angle and override it each time. (But since you can put it into a helper function, it shouldn't be a big inconvenience, either. You'll just have to call the helper function instead of the default walk function—as long as you're not relying on any pathfinding around obstacles.)

It probably wouldn't be too hard to hack a custom build of the engine to use diagonal walk angles by default, but of course it would only work with that particular custom engine build.
#369
I would create a helper function in GlobalScript that selects the character angle and walks to a given set of coordinates. (There are a couple of wrinkles in the calculation that also need to be taken care of—avoiding a division by zero if you try to walk straight up or down, for example.)

Then you would call that function when you make a character walk. For example, if you walk by clicking, you would probably call it in on_mouse_click(). Without more details about the game I can't really specify it further.
#370
This is pretty easy to do as long as the character always walks in a straight line towards where you click, but if you want pathfinding (where it figures out detours around obstacles), I don't think AGS really supports this as of now.

The straightforward approach is to calculate which direction your character is walking (using the origin and destination coordinates and calculating the angle by taking arctan((y1-y0)/(x1-x0))), and setting the correct loop based on that.
#371
And what I'm saying is that you're still going to need most of those concepts, because otherwise how could we keep track of module versions and ensure that what gets uploaded is legit? So you just end up reinventing a source control system. (I suppose you could have a page with a simple upload button that sends it to a maintainer to do all the source control stuff behind the scenes, but you said that relying on a maintainer to always be around is unrealistic.)

And meanwhile, people are still going to be posting fixes to forum threads, so you'll have to "hunt for modules" in any case.

Quote from: Alan v.Drake on Fri 26/04/2024 23:33:13The other problem is that you're only finding a module's repo because someone made a post on the forum/wiki/erico's module list, because those are the likely search results.
You don't just search "ags modules" on github and get what you want, unfortunately.

That's what this proposal is meant to solve, surely?
#372
Quote from: Alan v.Drake on Tue 23/04/2024 17:49:09GIT is great for us developers, but for an average AGS user going through GIT to find things is an obstacle. Not to mention forking and sending a PR.

I don't see how github is more of an obstacle than any other file hosting site for someone just looking to download a module.

And in order to allow people to modify the modules and share updates in any kind of systematic manner, you will need some kind of source control, whether that's git or svn or something else—and why would we think we can build or own, better system? I say stick with the standard, and if people can't figure out how to use it, someone will just have to do it for them.

If github is chosen, does anyone have a suggestion for how the archive should be organized? I would assume we'd want a separate repo for each module rather than a single one for the whole collection: that way people can get the particular module they're interested in, make a local branch of the repo, fork it, etc., without involving the whole archive of other modules, and the version histories are kept separate. (Besides, a number of modules already have their own github repos.) But I can't figure out just how you would group a bunch of repos in github. They have things like "projects" and "organizations," but I can't fully wrap my head around the semantics.
#373
In general, it's difficult to tell what the problem is just from the error message without seeing the code.

Your errors might be because the commands haven't been placed inside a function. In AGS, all code (except code to declare variable types or create, export and import variables and functions) has to be inside a function (which in dialog scripts means under a label), because that tells the machine when it should run. Or it might be something else. If you post the code around the lines it complains about, we might be able to tell.
#374
If this is primarily intended as an archive of old modules (I believe there are very few plugins that are open-source), I think we need to consider what we can do without explicit permission from the original developers.

Many modules have been released without any defined license, and although one can probably argue that the act of posting them grants implicit permission to download and use them in a game, is rehosting them OK? Is modifying them OK? Is sharing the modified versions OK? By strict IP rules, probably not.

There's a difference between being "open-source" in the sense that the source code is available (which for AGS is more of an "accidental requirement" of releasing a module/library), and being "free and open-source" in the sense that you have permission to use and modify it freely under certain terms.
#375
Really cool work, @eri0o. One idea: It would be nice if users could provide colors in hex-RGB format as well as AGS color number: "[c:#ff88aa]Light pink color text[/c]"
#376
Yeah, there's clearly a large component of random chance in whether an approach will seem plausible or not. It's like those "Hey, I lost my phone and now I'm stranded without money, please help!" scams. 99 times out of a hundred they'll be an obvious lie, but every now and then the real-world context will match up well with the story, and the target can be fooled.

And scammers have already started using ChatGPT and other AI tools (including voice cloning and even video facechanging) to mimic the person being impersonated, so we can't rely on recognizing the person we're communicating with in any case.
#377
I was contacted by "Kastchey" when the account was hacked, but the whole interaction raised some red flags straight away:

Quotehii
> ...
how are u?
> ...
good
do u have a 5 min?

I don't know if the hackers can read the past message history, but that's not a very good Kastchey impression.
#378
Quote from: Crimson Wizard on Thu 18/04/2024 08:54:28EDIT2: I just realized, but this question is different from the original problem in this thread. May the mods split this out, starting with the first post here? (@Gilbert):
https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/a-few-more-noob-questions-for-my-dialogue-gui/msg636660756/#msg636660756

Done.

Original thread here.
#379
What happens if you comment out the ChangeRoom?
#380
Quote from: eri0o on Thu 11/04/2024 11:19:42I think I probably would do this with one Overlay per letter to be able to be more flexible but the issue is you lose the easyness to share it with some other module, this is why in my head it has to become a big swiss army knife of talking module.

This is something I would try hard to avoid. When I've been working on the SpeechBubble and Lipsync modules, the architecture and implementation have often pushed in this direction, but the scope just gets so gigantic and unwieldy that it's almost impossible to complete.

What I do agree with is that it would make sense to also control typewriter dynamic text formatting (e.g. speed) with tags in the same way as rich text.

Rather than try to do everything in one big module, would it be possible to have a parser that could be generic enough that it could simply report the tags/commands detected one by one, and then different modules could handle the ones they know about?
SMF spam blocked by CleanTalk