bugFreeciv - Bugs: bug #18394, self root_req'd techs are removed,...

 
 
Show feedback again

bug #18394: self root_req'd techs are removed, even if a nation's init_tech lists it

Submitted by:  None
Submitted on:  Fri 22 Jul 2011 02:59:31 AM UTC  
 
Category: generalSeverity: 2 - Minor
Priority: 5 - NormalStatus: Fixed
Assigned to: Jacob Nevins <jtn>Originator Email: -unavailable-
Open/Closed: ClosedRelease: 2.3.0-beta4
Operating System: AnyPlanned Release: 2.3.2, 2.4.0, 2.5.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 30 Mar 2012 09:28:33 PM UTC, SVN revision 21078:

Treat self-rooted techs as reachable for players that already have them.
Without this, they were essentially unusable (could never be obtained).

Reported anonymously and by David Fernandez (bardo@gna).

See gna bug #18394.

(Browse SVN revision 21078)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Fri 30 Mar 2012 09:26:28 PM UTC, SVN revision 21077:

Treat self-rooted techs as reachable for players that already have them.
Without this, they were essentially unusable (could never be obtained).

Reported anonymously and by David Fernandez (bardo@gna).

See gna bug #18394.

(Browse SVN revision 21077)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Fri 30 Mar 2012 09:20:26 PM UTC, SVN revision 21076:

Treat self-rooted techs as reachable for players that already have them.
Without this, they were essentially unusable (could never be obtained).

Reported anonymously and by David Fernandez (bardo@gna).

See gna bug #18394.

(Browse SVN revision 21076)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Thu 29 Mar 2012 12:35:57 AM UTC, comment #8:

Ah yes, that'd be it.

Re-verified the problem and fix with S2_3 (same procedure as comment #4).

I can commit this soon; it seems relatively low-risk (should only be able to have any effect in the presence of self-root-req'd techs), and the multiplayer ruleset didn't crash and burn when I tried it.

(However, I think none of this mechanism to prevent multiple Darwin's Voyage wins in multiplayer, referred to in comment #5, is working correctly; in my tests Give_Imm_Tech was active and I could get arbitrary new techs by rebuilding Darwin in different cities. New ticket needed.)

(file #15447)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Wed 28 Mar 2012 10:09:58 PM UTC, comment #7:

> I'm not sure by what mechanism it was causing this particular
> symptom.


I think it's tech.c:player_research_update() lines 354-255 (in trunk) that again make tech unknown for everyone:

if (!player_invention_reachable(pplayer, i, FALSE)) {
player_invention_set(pplayer, i, TECH_UNKNOWN);

I think you should commit your fix before 2.3.2 release.

Marko Lindqvist <cazfi>
Project Administrator
Sun 11 Dec 2011 11:45:56 PM UTC, comment #6:

The following patch to player_invention_reachable() seems to fix this for me (still on S2_4). I think it's a correct change we should make, but I'm not sure by what mechanism it was causing this particular symptom.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 11 Dec 2011 11:23:20 PM UTC, comment #5:

Testing with the self-rooted "Theory of Evolution" tech in the multiplayer ruleset indicates that it's silently failing there too (at least on S2_4)... so by repeatedly rebuilding Darwin's Voyage, it looks like you can get as many free advances as you like. (Haven't verified on S2_3.)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sun 11 Dec 2011 11:07:24 PM UTC, comment #4:

Trying this with S2_4 (r20647), I think it is (still) broken.

I hacked the default ruleset so that Fusion Power had req1=req2="None" and root_req="Fusion Power". I then changed abkhaz.ruleset so that init_techs="Fusion Power".

On starting the game as the Abkhaz:

  • "Fusion Power" does appear in the help
  • But it doesn't appear in the (Gtk) tech tree, regardless of "Show all"
  • The editor doesn't think we have it either
  • Attempting to explicitly give it via script doesn't work either:

Pottery worked as expected; Fusion Power did not.

So it seems that it's not possible to use self-root-req'd techs at the moment.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 24 Sep 2011 07:05:08 PM UTC, comment #3:

When I create a new tech with root_req being itself, this tech is showed in the tech tree, in orange colour, but I still do not know how to give such techs to a nation.
Latest time I tested with v2.3, the line "init_techs=" (inside the nation.ruleset) did not work with those self root_req techs.

-Deleted Account- <tirolalira>
Sat 24 Sep 2011 05:43:42 PM UTC, comment #2:

what exactly did you test? (see also bug #18711)

Matthias Pfafferodt <syntron>
Project Member
Fri 22 Jul 2011 11:17:11 AM UTC, comment #1:

I agree it did not work with v2.3.0-beta4

I did try to use LUA scripts to give such techs (root req itself) to a nation, but the tech does not appear in the tech tree, and it can not be used to enable other units or techs.

However, I just installed the new 2.3 version and those techs (root req itself) do are showed in the tech tree.

-Deleted Account- <tirolalira>
Fri 22 Jul 2011 02:59:31 AM UTC, original submission:

self root_req'd techs are removed, even if a nation's init_tech lists it

While toying with learning to mod/create custom civ rulesets, I wanted to create some buildings and units which were unique to specific nations. According to the default techs.ruleset comments:

However, when I did this, the techs were simply removed from the game and became unavailable. Even going in to the in-game editor and trying to add the techs to the nations failed--Upon applying and exiting the editor, the techs were again removed.

Although I do not know LUA or what it is capable of, I suspect that even trying to add the techs via a LUA script will also fail, since the editor can't even add them.

Anonymous

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #15447:  trunk-S2_4-S2_3-self-root-req-reachability.diff added by jtn (1kB - text/x-patch - trunk/S2_4/S2_3 r21065)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by syntron (Posted a comment)
  • -unavailable- added by tirolalira (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 30 Mar 2012 09:31:19 PM UTCjtnStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 29 Mar 2012 12:35:57 AM UTCjtnAttached File-=>Added trunk-S2_4-S2_3-self-root-req-reachability.diff, #15447
      Assigned toNone=>jtn
    Wed 28 Mar 2012 10:09:58 PM UTCcazfiCategoryrulesets=>general
      StatusNone=>Ready For Test
      Operating SystemMicrosoft Windows=>Any
      Planned Release=>2.3.2, 2.4.0, 2.5.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup