Search found 1925 matches

by marzo
Fri Jul 23, 2021 8:27 am
Forum: Exult Discussion
Topic: clang-format
Replies: 2
Views: 4735

Re: clang-format

I do intend to apply it eventually. The major issue is the many #ifs and #ifdefs littered across the codebase that are splitting statements and which could lead to inconsistent formatting depending on the platform in use. I think I cleaned up most of the #ifs and #ifdefs that modified stuff within s...
by marzo
Mon May 25, 2020 6:01 pm
Forum: Exult Discussion
Topic: U7:TFL
Replies: 17
Views: 17285

Re: U7:TFL

I myself am using HexChat; it works well enough, especially if you never need to type non-English characters.
by marzo
Mon Apr 06, 2020 1:52 pm
Forum: Exult Discussion
Topic: U7:TFL
Replies: 17
Views: 17285

Re: U7:TFL

Hm, I see that SF has decommissioned CVS write support. I can port it all to git or SVN if you want, and maybe put on Github as well.
by marzo
Mon Apr 06, 2020 1:27 pm
Forum: Exult Discussion
Topic: U7:TFL
Replies: 17
Views: 17285

Re: U7:TFL

Oh, hi there.

I can take a look at the lastest snapshot of TFL and see what is the issue.

By the way, Exultbot, ChanServ, and me have been keeping the channel alive in IRC.
by marzo
Wed Aug 15, 2018 5:37 pm
Forum: Exult Discussion
Topic: How to pull from lists in Usecode C?
Replies: 2
Views: 2396

Re: How to pull from lists in Usecode C?

Lets say that you have a list with the numbers of the temporary NPCs in a variable called tempNPCs. You might create a function that gets the list and returns a random temporary NPC that looks like this: var getRandomTemporaryPartyNPC(var tempNPCs) { // Create an array with all temporary NPCs curren...
by marzo
Fri Jan 27, 2017 1:19 am
Forum: Exult Discussion
Topic: Variable in Say line?
Replies: 4
Views: 3236

Re: Variable in Say line?

This is what happens to anyone coding without coffee :-)
by marzo
Thu Jan 26, 2017 10:15 pm
Forum: Exult Discussion
Topic: Variable in Say line?
Replies: 4
Views: 3236

Re: Variable in Say line?

Spot the differences: say("@", defendant ", is innocent! ", playername ", and ", pronoun ", companions have no wish to destroy Beauty!@"); say("@", defendant , " is innocent! ", playername , " and ", pronoun , " companions ha...
by marzo
Wed Jan 11, 2017 9:18 pm
Forum: Exult Discussion
Topic: goto in Usecode C?
Replies: 11
Views: 6423

Re: goto in Usecode C?

Are you sure you don't just have a variable or function with that name? UCC simply does not work like that, it would try to find a variable or function with that name (spitting out an error if there was neither) and Exult would then try to interpret what was given as a string, probably with bad resu...
by marzo
Fri Jan 06, 2017 7:35 pm
Forum: Exult Discussion
Topic: NPC Conversation Length?
Replies: 2
Views: 2232

Re: NPC Conversation Length?

The most obvious one is to run Exult in 320x200 mode with aspect correction and scaling so it does not look tiny. If memory serves, an asterisk can also force a line break, or you can write '\n' on the string with the same effect.
by marzo
Fri Jan 06, 2017 11:09 am
Forum: Exult Discussion
Topic: goto in Usecode C?
Replies: 11
Views: 6423

Re: goto in Usecode C?

Here is a bit more information on while and do...while, then: do { // code if (condition1) { break; // Exits the loop } else if (condition2) { continue; // Goes back to the 'do' } // more code } while (condition3); while (condition1) { // code if (condition2) { break; // Exits the loop } else if (co...
by marzo
Thu Jan 05, 2017 1:59 pm
Forum: Exult Discussion
Topic: goto in Usecode C?
Replies: 11
Views: 6423

Re: goto in Usecode C?

None of them use it; but it is like ucxt output: loop_start: //code if (stuff) { goto loop_break; } // more code goto loop_start; loop_break: Which can be done as: while (true) { //code if (stuff) { break; } // more code } Really, there is nothing to be gained by using goto. And using it is a guaran...
by marzo
Wed Jan 04, 2017 6:59 pm
Forum: Exult Discussion
Topic: goto in Usecode C?
Replies: 11
Views: 6423

Re: goto in Usecode C?

You can use while or do...while for this purpose; it is better than using a goto, and you can almost always restructure the code to use one of them instead (in FoV, I think only LB's usecode needs a slight twist to rewrite without a goto). UCC does support goto statements and labels; but here is som...
by marzo
Sat Dec 31, 2016 12:07 pm
Forum: Exult Discussion
Topic: UCC Crash Building BGKeyring
Replies: 3
Views: 2274

Re: UCC Crash Building BGKeyring

Those aren't errors, they are warnings. UCC detects infinite loops, but it does not detect if they can be escaped from; instead, it warns you so you can check yourself.

As Dominus said, the crash must be somewhere else. I will check when I get the time.
by marzo
Mon Dec 26, 2016 10:51 am
Forum: Exult Discussion
Topic: How is warmth calculated in SI
Replies: 7
Views: 2793

Re: How is warmth calculated in SI

The NPC flags are actually an Exult thing; they are hard-coded in the original. Warmth is computed by starting from a base value (which depends on the freezing flag being set, and neither value I remember off the top of my head) then add the warmth values of every piece of equipment being worn. The ...
by marzo
Mon Dec 26, 2016 10:45 am
Forum: Exult Discussion
Topic: Usecode to find item carrier?
Replies: 9
Views: 4513

Re: Usecode to find item carrier?

... that is what the function does... if it fails to give the outermost container, then something is VERY wrong, and you should just close Exult and start it again. And if it keeps happening, file a bug report. Seriously, you don't need to check it; it returns either zero if the object is directly i...
by marzo
Thu Dec 22, 2016 2:08 pm
Forum: Exult Discussion
Topic: Usecode to find item carrier?
Replies: 9
Views: 4513

Re: Usecode to find item carrier?

Read the description of get_cont_items ; does it sound like what you need? No, it does not. Now check get_container . I suppose this one should be changed to say it gets the immediate container; but in any event, you can loop it until you get an object without a container. This is common enouh that ...
by marzo
Wed Dec 14, 2016 2:28 pm
Forum: Exult Discussion
Topic: SI 1.07 Beta
Replies: 78
Views: 31851

Re: SI 1.07 Beta

You can search the map with ES (shape, frame and quality); but not finding it does not mean it is not used, as it can be created by usecode.
by marzo
Wed Dec 14, 2016 2:26 pm
Forum: Exult Discussion
Topic: Help with usecode
Replies: 40
Views: 13763

Re: Help with usecode

Z limit in Exult is 255; in the original games it was 15.
by marzo
Sun Dec 11, 2016 5:37 pm
Forum: Exult Discussion
Topic: Event on Carrying?
Replies: 9
Views: 6070

Re: Event on Carrying?

The keyring is actually hard-coded; which is why I added the option of using it on the avatar to add all keys to it in BG Keyring.
by marzo
Sun Dec 11, 2016 4:52 pm
Forum: Exult Discussion
Topic: Event on Carrying?
Replies: 9
Views: 6070

Re: Event on Carrying?

No, it does not. What does explain that is the completely stupid way that SI implemented polymorph: when an NPC is polymorphed, SI would overwrite the shape data in memory to that of the target shape; when you polymorph back it reloads the original shape data. Thus keeps the shape number, so when lo...
by marzo
Sat Dec 10, 2016 4:37 pm
Forum: Exult Discussion
Topic: Event on Carrying?
Replies: 9
Views: 6070

Re: Event on Carrying?

Just something else: the polymorph event also wasn't known about for a long time after Exult had implemented it the way I described. It was only when I dumped all usecode with ucxt and went looking for unimplemented stuff which made me find this, and no one thought it was a good idea to replicate th...
by marzo
Sat Dec 10, 2016 4:13 pm
Forum: Exult Discussion
Topic: Event on Carrying?
Replies: 9
Views: 6070

Re: Event on Carrying?

There is no 'on carrying' event, no. The polymorphed event is actually not used by Exult: the original SI did not save polymorph shapes on the save game, but only the polymorph flag, and executed the NPC's usecode with this event when the game was loaded to set the polymorph shape back. Exult just s...
by marzo
Thu Nov 03, 2016 2:58 pm
Forum: Exult Discussion
Topic: Arrays and functions
Replies: 13
Views: 5795

Re: Arrays and functions

You can't use it like that, no; cases in a converse block need to be string literals because of the way they were stored and checked in the original games (basically, a pointer to where the string is stored in the usecode function's header). Although, to be fair, Exult and UCC could be extended to s...
by marzo
Wed Nov 02, 2016 7:15 pm
Forum: Exult Discussion
Topic: UI_close_gumps
Replies: 5
Views: 3383

Re: UI_close_gumps

It will make no difference; the delay will start ticking away once the gumps are closed.
by marzo
Wed Nov 02, 2016 7:13 pm
Forum: Exult Discussion
Topic: Arrays and functions
Replies: 13
Views: 5795

Re: Arrays and functions

Any usecode variable can be converted to/from an array at any point: var myVar = 0; // not an array myVar[1] = "This works"; // now an array with two elements myVar[2] = [1, "test", item]; // an element in an array can also be an array myVar = "Done"; // not an array an...
by marzo
Fri Oct 28, 2016 5:46 pm
Forum: Exult Discussion
Topic: UI_close_gumps
Replies: 5
Views: 3383

Re: UI_close_gumps

UI_close_gump closes a single gump, which MUST me passed as a parameter; UI_close_gumps closes all active gumps.

Your issue is another: eggs don't trigger when gumps are showing.
by marzo
Mon Oct 03, 2016 1:28 pm
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

I think it is only documented in the code; I can make a list later. But yeah, the other bits are flags for other stuff, including looking for enemies.
by marzo
Sun Oct 02, 2016 8:11 pm
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

Patrol only uses proximity barks with the correct path eggs; they need to have the correct qualiy for it (specifically, the remainder of quality divided by 32 must be 15). If no path eggs encountered in patrol schedule match this, then the proximity barks don't get triggered in patrol schedule.
by marzo
Sat Oct 01, 2016 12:00 pm
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

As I said more than once, proximity barks depend on schedule: with the "correct" schedule he should use the barks, with other schedules (such as the one he is programmed with) it does not get used. There is a reason why I changed Exult to only trigger proximity barks on certain schedules: ...
by marzo
Sat Aug 27, 2016 5:52 pm
Forum: Exult Discussion
Topic: Avatar will not revive in Paws!
Replies: 4
Views: 2356

Re: Avatar will not revive in Paws!

Please update Exult to a newer snapshot; there was a bug to that effect that was recently fixed.
by marzo
Wed Aug 17, 2016 10:08 am
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

If he is saving from ES, then it is creating a new savegame. I will have to check the identity issue; but in the mean time, you can set custom usecode for them in ES which sets the identity to the proper value then calls their normal usecode. As for the spells, I just realized that the way the code ...
by marzo
Tue Aug 16, 2016 2:17 pm
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

That happens automatically when they die (this is a bug if it is not happening). The spells would not be inside the usecode container anyway.
by marzo
Tue Aug 16, 2016 12:19 pm
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

Only the avatar can really have an usecode container. All it has are path eggs, by the way, which SI's usecode uses to run scripts on.
by marzo
Sat Aug 13, 2016 11:21 pm
Forum: Exult Discussion
Topic: Exult is not finding static path of Games
Replies: 29
Views: 7263

Re: Exult is not finding static path of Games

Dominus: if memory serves, I added some code that defaults gamedat and save dir to a subdue of appdata/local by default, even if everything else is inside program files.
by marzo
Fri Aug 12, 2016 9:32 pm
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

Given your recent bug report, I took a closer look at what you are doing. So here it goes: It looks like the UI_set_item_frame_rot and plain UI_set_item_frame are backward in the Usecode doc. The rot one is indeed needed to set the NSEW rotation bit. The one without rot sets the non-rotated shape, o...
by marzo
Fri Aug 12, 2016 4:48 pm
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

For what is worth, Exult is not limited to 256 full NPCs and 100 monsters like the original; for your mod, you could turn all of these fake NPCs into full NPCs.
by marzo
Thu Aug 11, 2016 9:35 am
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

No, there is not. You can rename an NPC, but not a shape.
by marzo
Wed Aug 10, 2016 8:33 pm
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

What I meant was: const int ERNESTO = -233; extern void funcRanger shape#(0x103) (); // Changed func name void Ernesto object#(0x4E9) () { item->funcRanger(); if (event == STARTED_TALKING) { ERNESTO->set_item_flag(MET); } } But yours is close enough. Re: body names: there is nothing that can be done...
by marzo
Wed Aug 10, 2016 2:13 pm
Forum: Exult Discussion
Topic: Aram Dol Face Shape?
Replies: 1
Views: 1896

Re: Aram Dol Face Shape?

That "Aram Dol" is actually an edit of one of the monks (shape 212 in faces.vga).
by marzo
Wed Aug 10, 2016 10:15 am
Forum: Exult Discussion
Topic: A Doubt
Replies: 57
Views: 32422

Re: A Doubt

That code is unlikely to work: shapeRanger expects an object, and you are passing 0 to it. Better would be to pass item instead. Also, I recommend putting an 'else' before most of the ifs as it will result in faster code. Finally, since you call shapeRanger on every case, you can just pull it out an...
by marzo
Tue Aug 09, 2016 12:39 am
Forum: Exult Discussion
Topic: Placing a new shape and frame?
Replies: 3
Views: 2138

Re: Placing a new shape and frame?

You can also use set_item_frame intrinsic after creating it.
by marzo
Mon Aug 08, 2016 11:55 pm
Forum: Exult Discussion
Topic: SI 1.07 Beta
Replies: 78
Views: 31851

Re: SI 1.07 Beta

Exult, ES, UCC, WUC and UCXT now support this Beta version of SI. I expect tons of bugs on the SI Beta side, so report them as you find them. By default, the exult.cfg configuration tag is "serpentbeta", and you can start it directly in Exult with --sib. UCXT also accepts --sib to dump its...
by marzo
Mon Jul 25, 2016 3:43 pm
Forum: Exult Discussion
Topic: Disabling the Die-Off in SI?
Replies: 65
Views: 19322

Re: Disabling the Die-Off in SI?

FYI, the lactose intolerance thing comes from Q&I mod. In retrospect, it does not make all that much sense because the kinds of cheese made in medieval period had no lactose left.
by marzo
Mon Jul 25, 2016 1:53 pm
Forum: Exult Discussion
Topic: Disabling the Die-Off in SI?
Replies: 65
Views: 19322

Re: Disabling the Die-Off in SI?

He is mixing up Keyring with plain BG/FoV.
by marzo
Mon Jul 25, 2016 12:03 am
Forum: Exult Discussion
Topic: Location-Based Proximity
Replies: 4
Views: 3399

Re: Location-Based Proximity

Patrol technically does not allow proximity events, not like the other schedules anyway. It merely calls usecode for certain kinds of path eggs, while the others are random.
by marzo
Sat Jul 23, 2016 5:47 pm
Forum: Exult Discussion
Topic: Location-Based Proximity
Replies: 4
Views: 3399

Re: Location-Based Proximity

Proximity usecode is triggered only by some schedules (as I believe I said to you in one of these threads). Specifically, only loiter, tend shop, dance, hound, sew or bake schedules trigger proximity usecode. If you want to make the NPC react the way you want, you need to add a usecode egg on the wa...
by marzo
Mon Jul 18, 2016 4:25 pm
Forum: Exult Discussion
Topic: Mod Help
Replies: 27
Views: 10835

Re: Mod Help

@Crowley: you are incorrect, it can't be written that way.
by marzo
Mon Jun 27, 2016 4:48 pm
Forum: Exult Discussion
Topic: Usecode Order Execution?
Replies: 7
Views: 3073

Re: Usecode Order Execution?

Eggs can only trigger based on avatar or party position, or if something is placed on them/removed. To "trigger" something like that you will need to change the usecode that opens the door to detect if it is the door you want, then do the action.