*** tpb has joined #freeorion | 00:00 | |
*** StrangerDanger has joined #freeorion | 00:08 | |
*** VargaD has quit IRC | 00:13 | |
*** Farmer__ has joined #freeorion | 01:09 | |
*** Farmer_ has quit IRC | 01:12 | |
*** _Maru_ has quit IRC | 01:18 | |
*** Farmer__ has quit IRC | 01:19 | |
*** _Maru_ has joined #freeorion | 02:23 | |
*** lethu has quit IRC | 03:47 | |
*** lethu has joined #freeorion | 04:02 | |
*** lethu has joined #freeorion | 04:02 | |
*** STalKer-Y has joined #freeorion | 04:42 | |
*** STalKer-X has quit IRC | 04:42 | |
*** gvdm has joined #freeorion | 07:20 | |
CIA-11 | FreeOrion: geoffthemedio * r4487 /trunk/FreeOrion/combat/OpenSteer/PathingEngine.h: Switched class forward declare to struct. | 07:59 |
---|---|---|
CIA-11 | FreeOrion: geoffthemedio * r4488 /trunk/FreeOrion/Empire/ (Empire.cpp Empire.h): Moved Alignment constructor implementations into header. | 08:00 |
CIA-11 | FreeOrion: geoffthemedio * r4489 /trunk/FreeOrion/parse/ (16 files): Grooming | 08:03 |
CIA-11 | FreeOrion: geoffthemedio * r4490 /trunk/FreeOrion/UI/ (InfoPanels.cpp InfoPanels.h): Modified BuildingIndicator to take a string building type name instead of a pointer to BuildingType. | 08:06 |
CIA-11 | FreeOrion: geoffthemedio * r4491 /trunk/FreeOrion/parse/ConditionParser.h: Switched another forward declare from class to struct. | 08:07 |
CIA-11 | FreeOrion: geoffthemedio * r4492 /trunk/FreeOrion/parse/MonsterFleetPlansParser.cpp: Grooming and tzlaine's modifications to attempt to improve compile speeds. | 08:08 |
CIA-11 | FreeOrion: geoffthemedio * r4493 /trunk/FreeOrion/universe/ (Building.cpp Building.h): Moved some constructor and getter implementations into header. | 08:09 |
CIA-11 | FreeOrion: geoffthemedio * r4494 /trunk/FreeOrion/universe/ (Condition.cpp Condition.h): | 08:10 |
CIA-11 | FreeOrion: -Moved constructor implementations into header. | 08:10 |
CIA-11 | FreeOrion: -Grooming | 08:10 |
CIA-11 | FreeOrion: geoffthemedio * r4495 /trunk/FreeOrion/universe/ (Effect.cpp Effect.h): Moved constructor implementations into header. | 08:13 |
CIA-11 | FreeOrion: geoffthemedio * r4496 /trunk/FreeOrion/universe/ObjectMap.h: class forward declare changed to struct. | 08:14 |
CIA-11 | FreeOrion: geoffthemedio * r4497 /trunk/FreeOrion/universe/ (ShipDesign.cpp ShipDesign.h): Constructor and trivial function implementations into header. | 08:15 |
CIA-11 | FreeOrion: geoffthemedio * r4498 /trunk/FreeOrion/universe/ (Special.cpp Special.h): Constructor and trivial function implementations into header. | 08:16 |
CIA-11 | FreeOrion: geoffthemedio * r4499 /trunk/FreeOrion/universe/ (Species.cpp Species.h): Constructor and trivial function implementations into header. | 08:17 |
CIA-11 | FreeOrion: geoffthemedio * r4500 /trunk/FreeOrion/universe/ (Tech.cpp Tech.h): Constructor and trivial function implementations into header. | 08:17 |
CIA-11 | FreeOrion: geoffthemedio * r4501 /trunk/FreeOrion/universe/ (Universe.cpp Universe.h): Constructor and trivial function implementations into header. | 08:24 |
CIA-11 | FreeOrion: geoffthemedio * r4502 /trunk/FreeOrion/universe/ (ValueRef.cpp ValueRef.h): Constructor implementations into header. | 08:24 |
GeofftheMedio | gvdm: yes, you need to uncomment test species in species.txt to play as them | 08:27 |
gvdm | also, how is the ordering of effects determined? | 08:37 |
gvdm | currently it seems to be something along the lines of, my species, techs, other species | 08:38 |
gvdm | why not all species at the same time? | 08:38 |
GeofftheMedio | Universe::GetEffectsAndTargets | 08:42 |
GeofftheMedio | should be all species, then all specials, then all techs, then buildings, then ship hulls and parts | 08:42 |
GeofftheMedio | actually, that may not be true | 08:47 |
GeofftheMedio | I'm not sure how they end up getting sorted in the container of intermediate results | 08:47 |
gvdm | well, i'm having techs being applied before species | 08:48 |
GeofftheMedio | what are you doing such that it matters? | 08:48 |
gvdm | a tech that multiplies a resource value, which is created in species | 08:49 |
GeofftheMedio | don't do that | 08:49 |
gvdm | but the bonus is 0, as the species value is applied later | 08:49 |
gvdm | why not? i want the tech to favour species that have a natural bonus in that field? | 08:50 |
GeofftheMedio | if mixing + and * effects, things get complicated and glitchy. just do + effects | 08:50 |
GeofftheMedio | you can check for the tech in the species effectsgroup | 08:51 |
gvdm | i'd rather not have that kind of dependency, at least not until there isn't multiple declarations of the same effect across many species | 08:52 |
GeofftheMedio | for now, it's all that can be done | 08:53 |
GeofftheMedio | and longer term, it's more consistent anyway | 08:53 |
gvdm | ok, but can we figure out why the ordering gets mixed up? | 08:55 |
GeofftheMedio | see above | 08:55 |
gvdm | i'm looking at StoreTargetsAndCausesOfEffectsGroups | 08:55 |
GeofftheMedio | the targets are stored in a map, which is indexed by sourced effects group, and thus sorted by sourced effects group | 08:56 |
GeofftheMedio | and not by the order they're added to the mpa | 08:56 |
GeofftheMedio | map | 08:56 |
gvdm | ok, so my case is, just as orbital farming adds a static +2 to farming, if we have a tech which adds a static +2 to mining, but the species is ethereal and not capable of mining, that should be excluded, so I attempted to rather add a small multiplier to the species effect already used, and if the species has 0, then its still fine | 09:00 |
gvdm | case 2, species with a natural inclination towards research, say, should be benefit more the research boosting tech | 09:01 |
gvdm | in Universe::ExecuteEffects it should be possible to use the EffectsCauseType to apply the effects in the order that they are retrieved no? | 09:20 |
GeofftheMedio | probably, but it would be better to store them in the order they're added to the map so that re-sorting after isn't necessary | 09:21 |
gvdm | yes | 09:21 |
gvdm | is there a way to tell either the iterator or the map to do that? | 09:21 |
gvdm | my c++/boost is mediocre | 09:21 |
GeofftheMedio | you'd probably need to replace the map with another container that stores its contents in the order they are added, not sorted by key | 09:22 |
gvdm | i remember using a sortedhashmap or something similar once, allowed you to access it linearly as well as by key | 09:23 |
gvdm | can't remember if it was java or something else | 09:23 |
gvdm | the map is from boost? | 09:23 |
GeofftheMedio | no, map and multimap are in the c++ standard library | 09:24 |
GeofftheMedio | don't need to be sorted | 09:24 |
GeofftheMedio | by key | 09:24 |
GeofftheMedio | which multimap and map are | 09:24 |
GeofftheMedio | probably a vector of std::pair would work fine | 09:24 |
gvdm | ok | 09:25 |
*** VargaD has joined #freeorion | 10:16 | |
gvdm | vectors have an insert function, and i'm calling std::make_pair to create the pair to insert, the vector is of type std::vector<std::pair<SourcedEffectsGroup, TargetsAndCause> > | 10:46 |
gvdm | the insert looks like targets_causes.insert(std::make_pair(sourced_effects_group, target_and_cause)) | 10:46 |
gvdm | Effect::TargetsCauses& targets_causes | 10:47 |
gvdm | makes no sense to me, all the types matchup | 10:59 |
GeofftheMedio | what's the problem...? | 11:07 |
GeofftheMedio | you probably should be using push_back instead of insert, though | 11:07 |
GeofftheMedio | there is no vector::insert that takes just an element to insert; you'd also need to pass an interator | 11:09 |
gvdm | aah, duh | 11:10 |
gvdm | no add? | 11:10 |
GeofftheMedio | read my previous messages | 11:10 |
gvdm | the c++ reference will tell me | 11:10 |
gvdm | right, onwards! | 11:11 |
*** VargaD has quit IRC | 11:16 | |
*** VargaD has joined #freeorion | 11:20 | |
*** gvdm has quit IRC | 11:38 | |
*** Xenux has joined #freeorion | 11:50 | |
*** gvdm has joined #freeorion | 12:03 | |
gvdm | geoff, patch in the forum (under programming) | 12:31 |
gvdm | GeofftheMedio | 12:31 |
*** welterde has quit IRC | 13:36 | |
*** welterde has joined #freeorion | 13:44 | |
*** StrangerDanger has quit IRC | 14:52 | |
*** Xenux has quit IRC | 15:26 | |
*** Xenux has joined #freeorion | 16:23 | |
*** lethu has quit IRC | 17:13 | |
*** Xenux has quit IRC | 18:11 | |
*** gvdm has quit IRC | 18:40 | |
*** lethu has joined #freeorion | 19:18 | |
*** Digit01 has joined #freeorion | 22:38 | |
*** _Maru_ has quit IRC | 23:32 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!