Jump to content

Code Discussion Thread


Celtic Minstrel

Recommended Posts

Originally Posted By: Cryolemon
Also, on a slightly different subject, is there a limit to how much damage one attack can do? I'm guessing 255 if there is?


More like 32767. The practical limit on how much you can do with maxed-out hacked weapons with the Flaming Weapon ability is somewhere around 1000 per hit, though.
Link to comment
Share on other sites

  • Replies 990
  • Created
  • Last Reply

Top Posters In This Topic

Originally Posted By: Thuryl
Originally Posted By: Cryolemon
Also, on a slightly different subject, is there a limit to how much damage one attack can do? I'm guessing 255 if there is?


More like 32767. The practical limit on how much you can do with maxed-out hacked weapons with the Flaming Weapon ability is somewhere around 1000 per hit, though.


Makes sense, on both counts.
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
Hmm... I'm thinking we should include current health, current spell points, experience, skill points, and level in a different node, mainly because there are so many of them. As I see it, a "statistic" is something you can train in, and under that definition those ones don't qualify.

Arf, it's already done ... If i ever find the time (or will) to split the code, i'll do a separate node, but i doubt it crazy

I've also added the Set_Town_Status node : if spec.ex1a is 0 (or -1 for legacy compatibility) the town is make hostile, 1 the town is make friendly, 2 the town is set dead (i.e next time entering the town will be abandonned).
The game code for "kill party if the town gets hostile" is already there, so maybe we can do another field (hostile_fry_party ?) in town structure for that ?

Chokboyz

Edit :
Originally Posted By: Thuryl
More like 32767

Definitely, the damage type is short.
Link to comment
Share on other sites

Originally Posted By: Chokboyz
Arf, it's already done ... If i ever find the time (or will) to split the code, i'll do a separate node, but i doubt it crazy
I don't think it would be hard. I could probably even do it for you.

Originally Posted By: Chokboyz
I've also added the Set_Town_Status node : if spec.ex1a is 0 (or -1 for legacy compatibility) the town is make hostile, 1 the town is make friendly, 2 the town is set dead (i.e next time entering the town will be abandonned).
Wonderful!

Originally Posted By: Chokboyz
The game code for "kill party if the town gets hostile" is already there, so maybe we can do another field (hostile_fry_party ?) in town structure for that ?
Sure, that's a good idea.
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
Wonderful!

Unfortunately, after some testing, all is not that brilliant : the "make friendly" part is working, but the monster will be in wandering mode if they were already wandering before (likely if the town was hostile). Besides apart, it works great (you can talk to people (provided you catch them wink ), etc ...).
The real problem comes with the dead part of the node : the town structure is read each time you enter the town so there's no way to change the town chop time or chop key without writing over the scenario itself. A workaround would be to kill all monsters manually (i.e by setting the active variable to 0), but with the town reset, monsters would reappear ... crazy

Chokboyz
Link to comment
Share on other sites

Oh. Hmm... I'll think of a way to handle that... or take suggestions if you think of one...

 

Originally Posted By: Celtic Minstrel
Originally Posted By: Thuryl
This is annoying, because a lot of scenario designers deliberately give important items a value of 0 so they can't be accidentally sold.
I thought you could sell items with a value of 0. Regardless, we could consider adding a flag for this. In fact, I think the best way would be to change the Cursed flag so that it prevents items from being unequipped, but shops will still buy it. Then the Not Sellable flag (or whatever you want to call it) means shops won't want to buy it. And when converting old scenarios, all items with the Cursed flag are automatically given the Not Sellable flag as well.
I got rid of the item_properties field and accessor functions for the various bits of it, in favour of using bitfield variables ident, property, magic, contained, cursed, concealed, enchanted, unsellable. I've started the task of using unsellable where appropriate, but... can you sell cursed items after the curse is removed no matter how it's removed? (Probably yes, but I'd just like to be sure.) That is, it doesn't matter whether you remove the curse at a healer or with a spell?

 

Originally Posted By: Celtic Minstrel
Speaking of item flags, I added an "Enchanted" flag a while back. I think it was so that if you enchant a sword with Shoot Flames, it won't disappear once it runs out of charges. (That is currently the case, right?)
Just wondering, did you implement this yet? I'll be doing it soon if I haven't already (I suspect I added the code to set it when enchanting a weapons but forgot to add the code to check it when deducting a charge from an item).
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
Oh. Hmm... I'll think of a way to handle that... or take suggestions if you think of one...

I've no suggestion for the moment ... crazy

Originally Posted By: Celtic Minstrel
Just wondering, did you implement this yet? I'll be doing it soon if I haven't already (I suspect I added the code to set it when enchanting a weapons but forgot to add the code to check it when deducting a charge from an item).

Not yet, added on todo list.

I've added a field (hostile_fry_party) to the town structure that will display the town string 17 (comment 1, i don't think it's ever used at all) and kill the party when the town get hostile.

Chokboyz

Edit : the previously mentionned "Change Creature Attitude" node is implemented (in Town Specs, number 197) : spec.ex1a is the number of the monster in the current town and ex.1b is the attitude to set it to (0 - Friendly, Docile, 1 - Hostile, Type A, 2 - Friendly, Will fight, 3 - Hostile, Type B).
Link to comment
Share on other sites

Originally Posted By: Chokboyz
I've added a field (hostile_fry_party) to the town structure that will display the town string 17 (comment 1, i don't think it's ever used at all) and kill the party when the town get hostile.
Hmm... what about a field containing the number of a special node to be called when the town goes hostile? That could either complement or replace hostile_fry_party.
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
Originally Posted By: Chokboyz
The last one i'm considering to implement is the "Make town hostile -> Set Town attitude" one (as in this post http://pied-piper.ermarian.net/topic/7/001822). Should i bother ?
I think Stareye actually changed the Make Town Hostile node to a Set Creature Attitude node, which I think should instead be a separate node. Then perhaps we could change Make Town Hostile to Set Town Status (valid statuses being friendly, hostile, and dead).


Perhaps an option to set the town's creatures to their preset attitudes (the ones set when you Edit Monster after placing a monster in a town) would be useful too.

As for monster stats, there's already a program called the Super Editor that increased all the monster and item stat caps, and it was used to create the Undoomvahgaz Armor god-party utility scenario. I'm currently using it to create my own god-party utility scenario, because Undoomvahgaz is not easy to come by, and as far as I know it doesn't maximize stats and give all spells and alchemy. Here's the page where you can download the Super Editor, at TrueSite:
http://www.truesite4blades.com/Home/listofalldownloads.html

I don't think it was ever used for anything other than Undoomvahgaz Armor due to the fact that modifying the program was forbidden at the time, but increasing the caps could have good uses.
Link to comment
Share on other sites

Originally Posted By: The Almighty Doer of Stuff
Perhaps an option to set the town's creatures to their preset attitudes (the ones set when you Edit Monster after placing a monster in a town) would be useful too.
Maybe this should automatically occur when you set the town to friendly?

For the problem of making towns dead, how about adding a "bool town_dead[200]" to the party structure? It's not ideal, but it should work. It would need to be initialized to all 0's, of course, and an element would be set to true whenever the town_chop_time is passed or the number of monsters killed in the town exceeds the maximum number of monsters to be killed in the town. It would also be set whenever the town's status is changed by a special node (to false if the town is set to hostile or friendly, to true if the town is set to dead).
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
Hmm... what about a field containing the number of a special node to be called when the town goes hostile? That could either complement or replace hostile_fry_party.

Hum, nice idea ... I'll see how i can implement that.

Originally Posted By: Celtic Minstrel
For the problem of making towns dead, how about adding a "bool town_dead[200]" to the party structure? It's not ideal, but it should work. It would need to be initialized to all 0's, of course, and an element would be set to true whenever the town_chop_time is passed or the number of monsters killed in the town exceeds the maximum number of monsters to be killed in the town. It would also be set whenever the town's status is changed by a special node (to false if the town is set to hostile or friendly, to true if the town is set to dead).

Would work, but that's will be for the next version (with structure modified. smile

The "item calls special node" depending of the magic_use_type part is implemented (like in your code) and working (0 is only local, 1 is town local and out global, 2 is town global and out local and 3 is only global).

Chokboyz
Link to comment
Share on other sites

In combine_things(), this check is made (twice, once for i and once for j):

Code:
univ.party[pc_num].items[j].item_properties & 254 != 0

 

It seems like it would be true if the item is magic or cursed, or if it has a concealed ability. (It would also be true if it were property or contained, but I assume those properties would have been stripped away before the function is called.) And its truth-value would not depend on whether the item is identified.

 

Am I correct?

 

The thing is, if I'm right, I don't think it's the right thing to check here. Unidentified items should not combine, for example (you wouldn't pour the contents of one bottle into another if you did not know they were the same potion, would you?). I don't think conceal ability should have an effect on whether they combine.

 

And then there's arrows, which is what makes me wonder if I read it right. If I did, I don't see why they combine (yet they do, and should).

Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
It seems like it would be true if the item is magic or cursed, or if it has a concealed ability. (It would also be true if it were property or contained, but I assume those properties would have been stripped away before the function is called.) And its truth-value would not depend on whether the item is identified.

Am I correct?

The thing is, if I'm right, I don't think it's the right thing to check here. Unidentified items should not combine, for example (you wouldn't pour the contents of one bottle into another if you did not know they were the same potion, would you?). I don't think conceal ability should have an effect on whether they combine.


The functions differs from Windows once again.
In Windows code, the only check done is if the item is identified ... (in windows code, identified is 1 (= 2^0)).
If the same convention is used for Mac, then the check you mentionned would be false only if the item has no properties at all (be it identified or not). So, you're basically correct ...
Here is the windows equivalent :

Click to reveal.. (Windows code)
void pc_record_type::combineThings()
{
int i,j,test;

for (i = 0; i < 24; i++) {
if ((items.variety > 0) && (items.type_flag > 0) && (items.isIdent()))
{
for (j = i + 1; j < 24; j++)
if ((items[j].variety > 0) && (items[j].type_flag == items.type_flag) && (items[j].isIdent()))
{
add_string_to_buf("(items combined)");
test = items.charges + items[j].charges;
if (test > 125) {
items.charges = 125;
ASB("(Can have at most 125 of any item.");
}
else items.charges += items[j].charges;
if (equip[j] == TRUE) {
equip = TRUE;
equip[j] = FALSE;
}
takeItem(30 + j);
}
}
if ((items.variety > 0) && (items.charges < 0))
items.charges = 1;
}
}


I've used the available Scenario Editor code and implemented an edit box in Town Advanced Details which allows the designer to specify a town special to call if the town becomes hostile.
I've also implemented a node that will display any picture (provided it's a .bmp) in a dialog (with only an ok button). The image can be of any size, but if it's too large to fit in the screen, it is automatically stretched (generally resulting in a large loss of quality).

If everything is ok, I will probably release Classic BoE version 1.0 tomorrow or Friday.

Hope it helps,
Chokboyz
Link to comment
Share on other sites

Originally Posted By: Chokboyz
The functions differs from Windows once again.
In Windows code, the only check done is if the item is identified ... (in windows code, identified is 1 (= 2^0)).
If the same convention is used for Mac, then the check you mentionned would be false only if the item has no properties at all (be it identified or not). So, you're basically correct ...
Here is the windows equivalent :

Click to reveal.. (Windows code)
void pc_record_type::combineThings()
{
int i,j,test;

for (i = 0; i < 24; i++) {
if ((items.variety > 0) && (items.type_flag > 0) && (items.isIdent()))
{
for (j = i + 1; j < 24; j++)
if ((items[j].variety > 0) && (items[j].type_flag == items.type_flag) && (items[j].isIdent()))
{
add_string_to_buf("(items combined)");
test = items.charges + items[j].charges;
if (test > 125) {
items.charges = 125;
ASB("(Can have at most 125 of any item.");
}
else items.charges += items[j].charges;
if (equip[j] == TRUE) {
equip = TRUE;
equip[j] = FALSE;
}
takeItem(30 + j);
}
}
if ((items.variety > 0) && (items.charges < 0))
items.charges = 1;
}
}
Okay, consider it fixed.

Originally Posted By: Chokboyz
I've used the available Scenario Editor code and implemented an edit box in Town Advanced Details which allows the designer to specify a town special to call if the town becomes hostile.
I've also implemented a node that will display any picture (provided it's a .bmp) in a dialog (with only an ok button). The image can be of any size, but if it's too large to fit in the screen, it is automatically stretched (generally resulting in a large loss of quality).
Two things here.

First, how does the node find the file? The method I was intending to use would be to search for a file called "sheetxxx.png" in the scenario's data folder (where xxx is a user-provided number, and the data folder is called scenname.exr).

Second, I think I would like this node to replace one of the dialog nodes (either dialog-terrain or dialog-item) since I intend to merge all three into a single node.

Also, I suggest we pick a large but arbitrary limiting size for the picture. I'm not sure what though, maybe 600x800 or something?
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
Okay, consider it fixed.

I will wink

Originally Posted By: Celtic Minstrel
First, how does the node find the file? The method I was intending to use would be to search for a file called "sheetxxx.png" in the scenario's data folder (where xxx is a user-provided number, and the data folder is called scenname.exr).

You enter the file name in one of the scenario text node and precise which one in the node spec.ex1a. Any filename (or even file path) can be used provided it begins in the current scenario folder.

Originally Posted By: Celtic Minstrel
Second, I think I would like this node to replace one of the dialog nodes (either dialog-terrain or dialog-item) since I intend to merge all three into a single node.

Would be as simple as copy paste the code, as i've used already present dialog code (added an item 20 case when populating the dialog which draw the picture.)

Originally Posted By: Celtic Minstrel
Also, I suggest we pick a large but arbitrary limiting size for the picture. I'm not sure what though, maybe 600x800 (800x600 ?) or something?

I won't, since the adjustment is automatically done (i've adviced, in the changelog, against using large picture for the previously mentionned reasons, though). If we set a limit size, we must think about how to enforce it : do we stretch the image until it fit (like i do) or do we truncated it ?

Chokboyz
Link to comment
Share on other sites

Originally Posted By: Chokboyz
Originally Posted By: Celtic Minstrel
First, how does the node find the file? The method I was intending to use would be to search for a file called "sheetxxx.png" in the scenario's data folder (where xxx is a user-provided number, and the data folder is called scenname.exr).

You enter the file name in one of the scenario text node and precise which one in the node spec.ex1a. Any filename (or even file path) can be used provided it begins in the current scenario folder.
...Okay, not what I had planned, but it works. Just, could you at least make it look in a resource folder as I mentioned, instead of the top level scenario folder? (Just replace the final character of the full scenario path with an R.)

Originally Posted By: Chokboyz
Originally Posted By: Celtic Minstrel
Second, I think I would like this node to replace one of the dialog nodes (either dialog-terrain or dialog-item) since I intend to merge all three into a single node.

Would be as simple as copy paste the code, as i've used already present dialog code (added an item 20 case when populating the dialog which draw the picture.)
Might be even simpler, a matter of moving the node within the enum (since there's no reason for nodes to appear in order within the switch statement).

Originally Posted By: Chokboyz
Originally Posted By: Celtic Minstrel
Also, I suggest we pick a large but arbitrary limiting size for the picture. I'm not sure what though, maybe 600x800 (800x600 ?) or something?

I won't, since the adjustment is automatically done (i've adviced, in the changelog, against using large picture for the previously mentionned reasons, though). If we set a limit size, we must think about how to enforce it : do we stretch the image until it fit (like i do) or do we truncated it ?
If it's too large, we shrink it to the maximum size. The only question is whether to preserve aspect ratio. I think we probably should, which means we would need to manually adjust the destination rect.

Oh, they should be able to provide a title for the map dialog (a single line of large bold text just above the image; the exact amount that fits would depend on the image size).
Link to comment
Share on other sites

Hm. There is a difference between Identified and Conceal Ability; the former means you have no idea what the item is, while the latter means you know what the item is but are unsure what it does (perhaps it's a legendary item whose use is known only in myth, or something).

 

So, if two items are unidentified, you don't know what either of them is, and you can't be sure they are even the same. If, however, they are identified but have a concealed ability, you know what they both are and know that they are the same, so they should combine. And yet... it seems a little odd that these two similar properties have different results here...

Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel

So, if two items are unidentified, you don't know what either of them is, and you can't be sure they are even the same. If, however, they are identified but have a concealed ability, you know what they both are and know that they are the same, so they should combine.


That's pretty much what I meant. As long as it's only the ability that is concealed then they should combine if they can. Is there any way for the party to find out what the concealed ability is? Say by a special or something?
Link to comment
Share on other sites

Originally Posted By: Cryolemon
That's pretty much what I meant. As long as it's only the ability that is concealed then they should combine if they can.
Well, that's the current behaviour, so no problem there.

Originally Posted By: Cryolemon
Is there any way for the party to find out what the concealed ability is? Say by a special or something?
No, there is not.
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
...Okay, not what I had planned, but it works. Just, could you at least make it look in a resource folder as I mentioned, instead of the top level scenario folder? (Just replace the final character of the full scenario path with an R.)

I don't really see the point, but for sake of code unification i've done it (now the base folder in which the images are searched is full_path_to_scenario/scenario_nameR/ instead of full_path_to_scenario/. Don't forget the scenarios folder can now have many subfolders).

I'll probably release Classic BoE version 1.0 this evening.

Chokboyz
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel


Originally Posted By: Cryolemon
Is there any way for the party to find out what the concealed ability is? Say by a special or something?
No, there is not.


Do you think it would be a good idea (or indeed practical) to include something like that? It would be cool to be able to create an item that has a concealed ability until the party read about in a book or get told what it does by an NPC.
Link to comment
Share on other sites

Originally Posted By: Chokboyz
I don't really see the point, but for sake of code unification i've done it (now the base folder in which the images are searched is full_path_to_scenario/scenario_nameR/ instead of full_path_to_scenario/. Don't forget the scenarios folder can now have many subfolders).
Correction: full_path_to_scenario/scenario_name.exr/

When I said "full path to scenario" I meant including the name of the scenario. wink

And the point is simply that that's how I'll be doing it, and this is one place where consistency between platforms is mandatory. And the reason why I'm doing it is so that all graphics for a given scenario are collected in one place, without cluttering up the main folder.

Originally Posted By: Cryolemon
Originally Posted By: Celtic Minstrel


Originally Posted By: Cryolemon
Is there any way for the party to find out what the concealed ability is? Say by a special or something?
No, there is not.


Do you think it would be a good idea (or indeed practical) to include something like that? It would be cool to be able to create an item that has a concealed ability until the party read about in a book or get told what it does by an NPC.
Maybe. What mechanism do you suggest?

It's impractical to have a special node affect an item for several reasons. First, there is no way for the player to choose an item in someone's inventory in a special node sequence (though there is the whole Sell button mechanism). Second, you'd either need to affect all items in a specific PC's inventory, or all items of a specific type in a specific PC's inventory. Both lead to potentially odd results; the former means that the NPC can tell you about any item you may posses, and both imply that if the ability is revealed on (for example) a Brew of Lethe, the next time you find a Brew of Lethe its ability will no longer be revealed (which doesn't make sense to me).

It could also be implemented like a sage selling identification, but that still leads to the same problem about not knowing the ability for future items of the same type.

If you have any suggestions, or believe one of these problems isn't truly a problem, fire away. laugh
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
Correction: full_path_to_scenario/scenario_name.exr/

Oh, you mean the r was supposed to replace the s of .exs when naming the ressource folder ? Ok, i'll correct that.

Originally Posted By: Celtic Minstrel
And the point is simply that that's how I'll be doing it, and this is one place where consistency between platforms is mandatory.

Suspecting as much, i've, in fact, adopted the convention wink

Originally Posted By: Celtic Minstrel
And the reason why I'm doing it is so that all graphics for a given scenario are collected in one place, without cluttering up the main folder.

If the player organizes his scenarios folder well enough (let's say a folder for each scenario), then the main folder wouldn't be cluttered at all (in fact even subfolders would be fairly scarse ...).
But that's nitpicking, i've adopted the scenario ressources folder method wink

Chokboyz
Link to comment
Share on other sites

Setting every instance of the same item type to stop concealing the ability seems to make the most sense to me. Maybe the same node could also set "Always Identified" and "Cursed" as well. I don't know if it would be worth it to set "Magical", though that's up for debate.

 

As for items being someone else's property or contained, I could see potential uses for changing those properties for individual items. Perhaps a Town Node that asks for a town number, a location (x,y), whether to set/unset Property and Contained (maybe Identified too?), and the item type number to set it for (perhaps with -1 indicating all items on that space). I don't know how many of those ideas are feasible, but it's always possible to pick and choose parts of the idea.

Link to comment
Share on other sites

Originally Posted By: The Almighty Doer of Stuff
Setting every instance of the same item type to stop concealing the ability seems to make the most sense to me.
And that's probably the hardest way, because the list of items is not saved in the saved game file. It's certainly possible, though.
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
Maybe. What mechanism do you suggest?

It's impractical to have a special node affect an item for several reasons. First, there is no way for the player to choose an item in someone's inventory in a special node sequence (though there is the whole Sell button mechanism). Second, you'd either need to affect all items in a specific PC's inventory, or all items of a specific type in a specific PC's inventory. Both lead to potentially odd results; the former means that the NPC can tell you about any item you may posses, and both imply that if the ability is revealed on (for example) a Brew of Lethe, the next time you find a Brew of Lethe its ability will no longer be revealed (which doesn't make sense to me).

It could also be implemented like a sage selling identification, but that still leads to the same problem about not knowing the ability for future items of the same type.

If you have any suggestions, or believe one of these problems isn't truly a problem, fire away. laugh


Hmm. Could you have a special node or something similar that turns off the "Conceal ability" flag for the item? Or would that not work / cause more problems?
Link to comment
Share on other sites

You mean, turn it off for all items of a particular type?

 

You probably could, yes. We'd have to add something to the party struct to keep track of it; perhaps a vector of item numbers who have had Conceal Ability turned off. Then when loading the game we'd have to go clear the Conceal Ability flag for all items in said list.

 

(This mechanism would not allow you to conceal the ability of an item whose ability was not concealed in the scenario file.)

Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
You mean, turn it off for all items of a particular type?

You probably could, yes. We'd have to add something to the party struct to keep track of it; perhaps a vector of item numbers who have had Conceal Ability turned off. Then when loading the game we'd have to go clear the Conceal Ability flag for all items in said list.

(This mechanism would not allow you to conceal the ability of an item whose ability was not concealed in the scenario file.)


Yeah that was the idea. I think what you say is probably the best way to do it.
Link to comment
Share on other sites

Originally Posted By: Thuryl
No, they all are. A few items in custom scenarios have crazy negative values because of it.
I think whether value is multiplied by charge should depend on the item variety. For example, arrows should be, but weapons should not. What other varieties should not do this? Scrolls? Potions? Armour and shields, I guess...

Originally Posted By: Chokboyz
Added a "Change Town Lightning" node. (special number 196, town special)
Use messages, don't use SDF, Jump To unchanged,
Extra.1a : lightning level to change to (0 - fully lit, 1 - Dark, 2 - Very Dark, 3 - Totally Dark). If not within [0,3], don't change town lightning.
Extra.1b : Unused
Extra.2a : Amount of party light level to change.
Extra.2b : 0 is give light to party, 1 is take light, other is do nothing.
Dynamically change the lightning of a town or the party light level.
I just noticed something odd about this: what's the difference between 0 (give light) and 1 (take light) when you're actually changing the global lighting properties of the town?

A related possibility would be to assign a lighting level to a room rectangle.

Originally Posted By: Chokboyz
If that seems ok (i.e nothing forgotten), i'll post the code. smile
Were you going to do this? Or does "post the code" mean commit it to the repository?

Originally Posted By: Chokboyz
(right before the rect_specials, but i think you said it's was a windows specificy ...)
Wait, what's Windows specific?

Originally Posted By: Chokboyz
I've adopted the "defy_scrying" notation (changeable at will). I think we should also check if hide_map is set because it makes little sense to be able to cast Magic Map and have the map saying it is impossible (but maybe you've already do that ...) wink
I've also adopted this.

Originally Posted By: Chokboyz
Originally Posted By: Celtic Minstrel
I think I would actually prefer -1 for <, 0 for ==, and 1 for >. I know -1 usually means "unused" in a special, though, which would make < the default (when probably you actually want > to be the default).

No problem. Done
...Okay... but should we give the ability to use <=, !=, and >= as well?
I'll take a look and implement it so.

Originally Posted By: Chokboyz

I've completed the (big) "Has enough Statistic" node with :
0-18 - corresponding skill
19 - Current Health
20 - Max Health
21 - Current Spell Points
22 - Max Spell Points
23 - Experience
24 - Skill points
25 - Level
Any objections to rearranging it like this?
Code:
0-18 - corresponding skill19 - Max Health20 - Max Spell Points21 - Current Health22 - Current Spell Points23 - Experience24 - Skill points25 - Level
That will simplify things if we decide to split it into two nodes.
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
I just noticed something odd about this: what's the difference between 0 (give light) and 1 (take light) when you're actually changing the global lighting properties of the town?

The spec2 field are modifying the party light level, so the node has two utility :
  • change the town lightning.
  • give the party light.
You can combine the two effects by, for example, putting the town to pitch black and remove all party light level.

Originally Posted By: Celtic Minstrel
Were you going to do this? Or does "post the code" mean commit it to the repository?

It's in the repository right now.

Originally Posted By: Celtic Minstrel
Wait, what's Windows specific?

It seems to me, you said there was no rect_spec type on Mac ... I may be mistaken, though.

Originally Posted By: Celtic Minstrel
...Okay... but should we give the ability to use <=, !=, and >= as well?
I'll take a look and implement it so.

<= n and >= n are useless, since you always use < n + 1 and > n - 1. I don't know about !=, i think it can be added.

Originally Posted By: Celtic Minstrel
Any objections to rearranging it like this?
[...]
That will simplify things if we decide to split it into two nodes.

Go ahead if you wants to, the windows code is now in the repository if you want to rearrange it too.

Chokboyz
Link to comment
Share on other sites

Originally Posted By: Chokboyz
Originally Posted By: Celtic Minstrel
I just noticed something odd about this: what's the difference between 0 (give light) and 1 (take light) when you're actually changing the global lighting properties of the town?

The spec2 field are modifying the party light level, so the node has two utility :
  • change the town lightning.
  • give the party light.
You can combine the two effects by, for example, putting the town to pitch black and remove all party light level.
Ah, okay. I guess that makes sense.

With regards to your hostile_fry_party, I'm not liking it very much; I think I will change it to call a special provided by the user... meaning it's not a bitfield variable.



Okay, so... if Chokboyz may not be around much anymore, is there anyone else who might be able to maintain the Windows code a little? I could probably work on the Windows code, but it would be useful to have someone to help out by building it and testing it.


...It would be hilarious if Ormus chose this moment to show up again...
Link to comment
Share on other sites

Originally Posted By: Celtic Minstrel
With regards to your hostile_fry_party, I'm not liking it very much; I think I will change it to call a special provided by the user... meaning it's not a bitfield variable.

Coming to the same conclusion, i've already replaced it with a mechanism similar to yours : one can specify a town node to call if town becomes hostile in the Town Advanced Details. (in version 1.0)

Originally Posted By: Celctic Minstrel
Okay, so... if Chokboyz may not be around much anymore, is there anyone else who might be able to maintain the Windows code a little? I could probably work on the Windows code, but it would be useful to have someone to help out by building it and testing it.

I'll add my todo list (if i found the whole list, that is smile ) and known scenario bug text file to the Win32 folder of the repository. The code may not be very commented, but Celtic Minstrel's experience helping, i think someone can gain a good knowlegde of it pretty fast.
Oh, and don't shout too loud if some of my programming is not top quality wink

Originally Posted By: Celtic Minstrel
...It would be hilarious if Ormus chose this moment to show up again...

It would indeed grin

Chokboyz
Link to comment
Share on other sites

Part of the problem so far is that there are two separate sets of code for each platform. I'd really like to merge them so that the same code can be compiled on either platform, through the use of conditional compilation. (Supporting multiple compilers would be good too, but it's not something I'm really able to do, since most of the compilers in question cost money.)

 

This would be a significant task, I think. Platform-dependent code is littered all over the place in the code. Still, I think it would be better than the current situation where the code is starting to diverge a little; there are things I've implemented that Chokboyz didn't, and vice versa, and there are also things that Ormus did that are incompatible with the way I've already merged stuff within the Mac code.

 

So... would anyone like to help with this? I think I would still continue to work on (a branch of) the Mac code up to the point where I can release a beta version, but at this point I think merging into a single codebase may be more important. Preferably I would have help from someone who can compile on Windows.

Link to comment
Share on other sites

Probably because Warrior's Grove is a medium-sized town, and in order for the program to import the town from Bladbase.exs, the first town needs to be medium as well. I'm assuming it wouldn't be too tough for the editor to be made to check if the Warrior's Grove button is selected and only then require that the first town be medium, though. (Speaking from no coding experience and not having seen the code, anyway.)

Link to comment
Share on other sites

Originally Posted By: The Almighty Doer of Stuff
Probably because Warrior's Grove is a medium-sized town, and in order for the program to import the town from Bladbase.exs, the first town needs to be medium as well. I'm assuming it wouldn't be too tough for the editor to be made to check if the Warrior's Grove button is selected and only then require that the first town be medium, though. (Speaking from no coding experience and not having seen the code, anyway.)


That makes sense. I haven't read the code either (I can program a bit, but hate c++ with a passion) so I don't know how easy or hard it would be to implement.
Link to comment
Share on other sites

Indeed, it shouldn't be unreasonably difficult make alterations to import Warrior's Grove regardless of the size of the existing, about to be overwritten town. While doing so is mildly annoying in the case where there are already multiple towns, it should be trivial in the case where the only town in the scenario is being replaced.

 

Originally Posted By: Cryolemon
(I can program a bit, but hate c++ with a passion)

Then you're in for a treat! The scenario loading and storing functions contain some marvelously crusty old C(-style) code. It's got lots of pointers, verbose error checking; it's great! (Or or you know, horrible, but it sure isn't properly idiomatic C++.)

Link to comment
Share on other sites

Originally Posted By: Niemand


Originally Posted By: Cryolemon
(I can program a bit, but hate c++ with a passion)

Then you're in for a treat! The scenario loading and storing functions contain some marvelously crusty old C(-style) code. It's got lots of pointers, verbose error checking; it's great! (Or or you know, horrible, but it sure isn't properly idiomatic C++.)


That's even worse, I know nothing at all about C, except the history of it. Pointers are most of the reason I hate C++.

Originally Posted By: Celtic Minstrel
I think the easiest thing to do here would be to import Warrior's Grove if requested, then add all the other requested towns. Then if you put 3 in the "medium towns" box and also check off Warrior's Grove, you'll end up with 4 medium towns in total.


That makes sense.
Link to comment
Share on other sites

  • 2 weeks later...

Just wonderin', how different are the Windows and Mac source codes? It seems like it should be possible to put all platform-specific functions in separate files, and have relatively cross-platform source files otherwise, which would make modifications easier, but I have no knowledge about BoE.

Basically, I'm interested in whether the differences are primarily in the rendering portions of the code, or if Jeff practically re-wrote the whole thing for Mac/Windows, whichever came later.

Link to comment
Share on other sites

Putting all the platform-specific stuff in separate files probably won't work well, because there are platform-specific bit scattered all over the place. It'd be better to use #ifdef WIN32 and similar things to merge the sources.

 

(Are you volunteering to help with this?)

 

The actual game logic is essentially the same; there are some discrepancies however which need to be fixed. Some of these were already present, while others have been introduced by Chokboyz or I introducing a feature and the other not duplicating it.

Link to comment
Share on other sites

The more people we have working on it, the better. Most of us can't dedicate a lot of time either.

 

If you want to help, I need your Google account email (you can PM me or send me an email if you don't want to post it publicly). Then I can give you commit access.

Link to comment
Share on other sites

Perhaps, instead of only bringing up the GNU GPL v2.0, at the top there should be a note stating that "While this program is released under GNU General Public License 2.0, some of the graphics distributed with it, specifically

  1. , are the sole property of Spiderweb Software, Inc. Historically, people have been allowed to use these graphics in custom scenarios for Blades of Exile, and they are included here for convenience; however, they are not to be used for any other purpose. For all other files contained in this program, the following open-source license applies."

 

I don't know how necessary this is, but I'm just suggesting it to be safe. Perhaps we wouldn't even be allowed to include them if Jeff knew about it. It's just something to think about, at least.

Link to comment
Share on other sites

Originally Posted By: The Almighty Doer of Stuff
Perhaps we wouldn't even be allowed to include them if Jeff knew about it.


That seems rather unlikely to me. Why make the game open source if you aren't going to allow the graphics to be distributed with it (obviously at the same time keeping ownership of the graphics)? Maybe someone should make some brand new graphics just in case, but I can't see it being an issue.
Link to comment
Share on other sites

Only the graphics that were originally distributed with BoE are open source. However, we are currently in the process of bringing in graphics that were exclusive to the Exile Trilogy and the Avernum series as well, and those are NOT released under the open-source license. That's what I was referring to.

Link to comment
Share on other sites

BoA will be released as open source eventually, I believe.

 

Even so, many of the graphics brought from BoA have needed alterations to fit the different format. I'd think those ones would technically belong to Mistborn or whoever else converts them.

 

Which leaves the ones from the Exile trilogy. Most of these have been used in scenarios already, though, so I think it's probably fine.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...