Re: [crossfire] Proposal for artifacts changes
Hello. I've committed changes to improve artifact support. A new field 'artifact' is added to 'object', to keep track of what optional artifact an item was created from. At save time, the 'bare' artifact is generated, and the item is saved compared to that artifact. At load time the loaded item gets the artifact values immediately after the archetype, to generate the artifact, then loads its potential custom values. This enables changing artifacts, including for existing items, for eg balance purposes. Regards Nicolas -- Mon p'tit coin du web - http://nicolas.weeger.org signature.asc Description: This is a digitally signed message part. ___ crossfire mailing list crossfire@metalforge.org http://mailman.metalforge.org/mailman/listinfo/crossfire
Re: [crossfire] Proposal for artifacts changes
After some thinking, maybe the best way would be to add a "from_artifact" field, or something like that, in generated artifacts. At loading the server would just see that field and instantiante the artifact from the archetype. At save time, generate the artifact, compare to the item (in case of really specific fields - besides, I think "magic" isn't modified by artifacts), and save as usual. Ensure simply that "from_artifact" is the first field after the archetype, and it should be ok. Regards Nicolas Le dimanche 16 octobre 2011 22:28:42, Mark Wedel a écrit : > On 10/16/11 04:21 AM, Nicolas Weeger wrote: > > Hello. > > > > > > I'd like to change artifacts handling by introducing archetypes for all > > artifacts combos. > > > > So for instance, for the 'Thieves' artifacts, an archetype named > > '__ring_Thieves' would be generated with the relevant properties, and > > used for the actual ring of Thieves. There would be various > > '__helmet_(whatever)' for helmets, and so on for all artifact > > possibilities. > > Do you see this as being done automatically (at collect time for > example), or this all done by hand? Or some combo? > > > I see various benefits to that. > > > > First, it would be possible to remove totally an artifact, leading to > > load errors warnings and discarding (making a singularity I think) the > > "actual" items this artifact represents. > > In general, using singularities is not a good thing. I'd have to look at > the code in particular, but when that happens, all that can happen is that > the singularity created can only fill in the values that it is reading > from the save file. And the save file only contains differences from the > artifact, so the end result is that the loaded object is likely to be > missing a lot of information to the extent it probably isn't usable (it > may even be missing name information). > > > And secondly it enables changing artifacts like other archetypes, with > > the change being applied directly to all existing items, instead of > > having various variants of the artifact. > > And that would be a good thing. I do wonder if it might make sense to > only apply this to equipment and not monsters however. Monsters, being > short lived and generated at that time, probably don't need archetypes - > if the artifact gets changed, it is not like there are a bunch of artifact > monsters sitting about that are out of date. > > > The drawback I see is the introduction of many temporary archetypes, but > > I guess we can live with that. > > I do wonder if rather than making artifacts for everything, if it would > be easier to just store a reference to the artifact that an item was > created from. I honestly don't really know - the problem with what I > suggest is that you need to have the logic at load time to go through and > look at the artifact, look at the original object (clone), and re-apply > the artifact changes and see if they are different. So as I think about > it, archetypes probably is simpler. > > Few questions/thoughts on this: > - If the archetype for an artifact combo is missing, what happens? Does > the server just treat that as an invalid combo and do nothing? Or > something else? I'd personally suggest it do nothing - in that way, combos > can be further tweaked by not having the corresponding archetype. There > are some combos that really just don't work - this is because the artifact > applies a percentage difference to the original, but the original has base > values too low such that no difference actually results. > > - If archetypes for all now exist, does it perhaps then make sense to just > make up treasurelists for these instead? Such that the occurrence for > these can be better tweaked, or more easily seen what the chances are? > > > What do you think of this proposal? > > Sounds good to me. One other advantage here is that this would make > adding artifacts to maps more consistent - one could basically just take > the armor or helmet or whatever archetype as is, and put it on the map and > the right thing should happen. -- Mon p'tit coin du web - http://nicolas.weeger.org signature.asc Description: This is a digitally signed message part. ___ crossfire mailing list crossfire@metalforge.org http://mailman.metalforge.org/mailman/listinfo/crossfire
Re: [crossfire] Proposal for artifacts changes
On 10/16/11 04:21 AM, Nicolas Weeger wrote: Hello. I'd like to change artifacts handling by introducing archetypes for all artifacts combos. So for instance, for the 'Thieves' artifacts, an archetype named '__ring_Thieves' would be generated with the relevant properties, and used for the actual ring of Thieves. There would be various '__helmet_(whatever)' for helmets, and so on for all artifact possibilities. Do you see this as being done automatically (at collect time for example), or this all done by hand? Or some combo? I see various benefits to that. First, it would be possible to remove totally an artifact, leading to load errors warnings and discarding (making a singularity I think) the "actual" items this artifact represents. In general, using singularities is not a good thing. I'd have to look at the code in particular, but when that happens, all that can happen is that the singularity created can only fill in the values that it is reading from the save file. And the save file only contains differences from the artifact, so the end result is that the loaded object is likely to be missing a lot of information to the extent it probably isn't usable (it may even be missing name information). And secondly it enables changing artifacts like other archetypes, with the change being applied directly to all existing items, instead of having various variants of the artifact. And that would be a good thing. I do wonder if it might make sense to only apply this to equipment and not monsters however. Monsters, being short lived and generated at that time, probably don't need archetypes - if the artifact gets changed, it is not like there are a bunch of artifact monsters sitting about that are out of date. The drawback I see is the introduction of many temporary archetypes, but I guess we can live with that. I do wonder if rather than making artifacts for everything, if it would be easier to just store a reference to the artifact that an item was created from. I honestly don't really know - the problem with what I suggest is that you need to have the logic at load time to go through and look at the artifact, look at the original object (clone), and re-apply the artifact changes and see if they are different. So as I think about it, archetypes probably is simpler. Few questions/thoughts on this: - If the archetype for an artifact combo is missing, what happens? Does the server just treat that as an invalid combo and do nothing? Or something else? I'd personally suggest it do nothing - in that way, combos can be further tweaked by not having the corresponding archetype. There are some combos that really just don't work - this is because the artifact applies a percentage difference to the original, but the original has base values too low such that no difference actually results. - If archetypes for all now exist, does it perhaps then make sense to just make up treasurelists for these instead? Such that the occurrence for these can be better tweaked, or more easily seen what the chances are? What do you think of this proposal? Sounds good to me. One other advantage here is that this would make adding artifacts to maps more consistent - one could basically just take the armor or helmet or whatever archetype as is, and put it on the map and the right thing should happen. ___ crossfire mailing list crossfire@metalforge.org http://mailman.metalforge.org/mailman/listinfo/crossfire
[crossfire] Proposal for artifacts changes
Hello. I'd like to change artifacts handling by introducing archetypes for all artifacts combos. So for instance, for the 'Thieves' artifacts, an archetype named '__ring_Thieves' would be generated with the relevant properties, and used for the actual ring of Thieves. There would be various '__helmet_(whatever)' for helmets, and so on for all artifact possibilities. I see various benefits to that. First, it would be possible to remove totally an artifact, leading to load errors warnings and discarding (making a singularity I think) the "actual" items this artifact represents. And secondly it enables changing artifacts like other archetypes, with the change being applied directly to all existing items, instead of having various variants of the artifact. The drawback I see is the introduction of many temporary archetypes, but I guess we can live with that. What do you think of this proposal? Regards Nicolas -- Mon p'tit coin du web - http://nicolas.weeger.org signature.asc Description: This is a digitally signed message part. ___ crossfire mailing list crossfire@metalforge.org http://mailman.metalforge.org/mailman/listinfo/crossfire