Sunday, 2011-11-20

*** tpb has joined #freeorion00:00
*** StrangerDanger has joined #freeorion00:08
*** VargaD has quit IRC00:13
*** Farmer__ has joined #freeorion01:09
*** Farmer_ has quit IRC01:12
*** _Maru_ has quit IRC01:18
*** Farmer__ has quit IRC01:19
*** _Maru_ has joined #freeorion02:23
*** lethu has quit IRC03:47
*** lethu has joined #freeorion04:02
*** lethu has joined #freeorion04:02
*** STalKer-Y has joined #freeorion04:42
*** STalKer-X has quit IRC04:42
*** gvdm has joined #freeorion07:20
CIA-11FreeOrion: geoffthemedio * r4487 /trunk/FreeOrion/combat/OpenSteer/PathingEngine.h: Switched class forward declare to struct.07:59
CIA-11FreeOrion: geoffthemedio * r4488 /trunk/FreeOrion/Empire/ (Empire.cpp Empire.h): Moved Alignment constructor implementations into header.08:00
CIA-11FreeOrion: geoffthemedio * r4489 /trunk/FreeOrion/parse/ (16 files): Grooming08:03
CIA-11FreeOrion: 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-11FreeOrion: geoffthemedio * r4491 /trunk/FreeOrion/parse/ConditionParser.h: Switched another forward declare from class to struct.08:07
CIA-11FreeOrion: geoffthemedio * r4492 /trunk/FreeOrion/parse/MonsterFleetPlansParser.cpp: Grooming and tzlaine's modifications to attempt to improve compile speeds.08:08
CIA-11FreeOrion: geoffthemedio * r4493 /trunk/FreeOrion/universe/ (Building.cpp Building.h): Moved some constructor and getter implementations into header.08:09
CIA-11FreeOrion: geoffthemedio * r4494 /trunk/FreeOrion/universe/ (Condition.cpp Condition.h):08:10
CIA-11FreeOrion: -Moved constructor implementations into header.08:10
CIA-11FreeOrion: -Grooming08:10
CIA-11FreeOrion: geoffthemedio * r4495 /trunk/FreeOrion/universe/ (Effect.cpp Effect.h): Moved constructor implementations into header.08:13
CIA-11FreeOrion: geoffthemedio * r4496 /trunk/FreeOrion/universe/ObjectMap.h: class forward declare changed to struct.08:14
CIA-11FreeOrion: geoffthemedio * r4497 /trunk/FreeOrion/universe/ (ShipDesign.cpp ShipDesign.h): Constructor and trivial function implementations into header.08:15
CIA-11FreeOrion: geoffthemedio * r4498 /trunk/FreeOrion/universe/ (Special.cpp Special.h): Constructor and trivial function implementations into header.08:16
CIA-11FreeOrion: geoffthemedio * r4499 /trunk/FreeOrion/universe/ (Species.cpp Species.h): Constructor and trivial function implementations into header.08:17
CIA-11FreeOrion: geoffthemedio * r4500 /trunk/FreeOrion/universe/ (Tech.cpp Tech.h): Constructor and trivial function implementations into header.08:17
CIA-11FreeOrion: geoffthemedio * r4501 /trunk/FreeOrion/universe/ (Universe.cpp Universe.h): Constructor and trivial function implementations into header.08:24
CIA-11FreeOrion: geoffthemedio * r4502 /trunk/FreeOrion/universe/ (ValueRef.cpp ValueRef.h): Constructor implementations into header.08:24
GeofftheMediogvdm: yes, you need to uncomment test species in species.txt to play as them08:27
gvdmalso, how is the ordering of effects determined?08:37
gvdmcurrently it seems to be something along the lines of, my species, techs, other species08:38
gvdmwhy not all species at the same time?08:38
GeofftheMedioUniverse::GetEffectsAndTargets08:42
GeofftheMedioshould be all species, then all specials, then all techs, then buildings, then ship hulls and parts08:42
GeofftheMedioactually, that may not be true08:47
GeofftheMedioI'm not sure how they end up getting sorted in the container of intermediate results08:47
gvdmwell, i'm having techs being applied before species08:48
GeofftheMediowhat are you doing such that it matters?08:48
gvdma tech that multiplies a resource value, which is created in species08:49
GeofftheMediodon't do that08:49
gvdmbut the bonus is 0, as the species value is applied later08:49
gvdmwhy not? i want the tech to favour species that have a natural bonus in that field?08:50
GeofftheMedioif mixing + and * effects, things get complicated and glitchy.  just do + effects08:50
GeofftheMedioyou can check for the tech in the species effectsgroup08:51
gvdmi'd rather not have that kind of dependency, at least not until there isn't multiple declarations of the same effect across many species08:52
GeofftheMediofor now, it's all that can be done08:53
GeofftheMedioand longer term, it's more consistent anyway08:53
gvdmok, but can we figure out why the ordering gets mixed up?08:55
GeofftheMediosee above08:55
gvdmi'm looking at StoreTargetsAndCausesOfEffectsGroups08:55
GeofftheMediothe targets are stored in a map, which is indexed by sourced effects group, and thus sorted by sourced effects group08:56
GeofftheMedioand not by the order they're added to the mpa08:56
GeofftheMediomap08:56
gvdmok, 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 fine09:00
gvdmcase 2, species with a natural inclination towards research, say, should be benefit more the research boosting tech09:01
gvdmin Universe::ExecuteEffects it should be possible to use the EffectsCauseType to apply the effects in the order that they are retrieved no?09:20
GeofftheMedioprobably, but it would be better to store them in the order they're added to the map so that re-sorting after isn't necessary09:21
gvdmyes09:21
gvdmis there a way to tell either the iterator or the map to do that?09:21
gvdmmy c++/boost is mediocre09:21
GeofftheMedioyou'd probably need to replace the map with another container that stores its contents in the order they are added, not sorted by key09:22
gvdmi remember using a sortedhashmap or something similar once, allowed you to access it linearly as well as by key09:23
gvdmcan't remember if it was java or something else09:23
gvdmthe map is from boost?09:23
GeofftheMediono, map and multimap are in the c++ standard library09:24
GeofftheMediodon't need to be sorted09:24
GeofftheMedioby key09:24
GeofftheMediowhich multimap and map are09:24
GeofftheMedioprobably a vector of std::pair would work fine09:24
gvdmok09:25
*** VargaD has joined #freeorion10:16
gvdmvectors 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
gvdmthe insert looks like targets_causes.insert(std::make_pair(sourced_effects_group, target_and_cause))10:46
gvdmEffect::TargetsCauses& targets_causes10:47
gvdmmakes no sense to me, all the types matchup10:59
GeofftheMediowhat's the problem...?11:07
GeofftheMedioyou probably should be using push_back instead of insert, though11:07
GeofftheMediothere is no vector::insert that takes just an element to insert; you'd also need to pass an interator11:09
gvdmaah, duh11:10
gvdmno add?11:10
GeofftheMedioread my previous messages11:10
gvdmthe c++ reference will tell me11:10
gvdmright, onwards!11:11
*** VargaD has quit IRC11:16
*** VargaD has joined #freeorion11:20
*** gvdm has quit IRC11:38
*** Xenux has joined #freeorion11:50
*** gvdm has joined #freeorion12:03
gvdmgeoff, patch in the forum (under programming)12:31
gvdmGeofftheMedio12:31
*** welterde has quit IRC13:36
*** welterde has joined #freeorion13:44
*** StrangerDanger has quit IRC14:52
*** Xenux has quit IRC15:26
*** Xenux has joined #freeorion16:23
*** lethu has quit IRC17:13
*** Xenux has quit IRC18:11
*** gvdm has quit IRC18:40
*** lethu has joined #freeorion19:18
*** Digit01 has joined #freeorion22:38
*** _Maru_ has quit IRC23:32

Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!