% % Hide Ship Names % % This script will name ships using boring fake names. You can % use this in anonymous games to avoid that enemies recognize you % (as a person) by your ship naming style. % % Fake names will be made up of a prefix (`hn.Prefix') followed % by several random digits. Outside PCC, only these fake names % will be seen. % % To use this, simply load it from your gameinit/autoexec file. % The rest is automatic. Like all automatisms, this one's dangerous: % % WARNING: if you load your turn with scrambled names, and your invoke % PCC 1.0.14 or before without this script loaded, the original names % will be lost! For a safer, semi-automatic version, use % Manuel's `scr-s-o.q'. % % To stop this and restore the normal names, do the following: % + load your turn as usual % + from the console, execute the command `hn.Terminate' % + exit PCC % + remove the `Load' command from your gameinit/autoexec file, % else name scrambling will start again. % % History: % + 04/Aug/2001 first version % + 02/Oct/2001 updated for PCC 1.0.15 % Print "[hidename.q 02/Oct/2001]" % Configuration variable. Set this to a different value if you wish % to use a different prefix. But then, you'll be recognizable again ;) Dim Shared hn.Prefix = "Serial #" % Internal Dim Shared hn.Terminated CreateShipProperty hn.RealName, hn.FakeName % Swap in ship names. This will turn the "fake" names % into real names. Sub hn.SwapInShipNames ForEach Ship Do If Owner$=My.Race$ Then If hn.RealName Then If Left(Name, Len(hn.Prefix)) = hn.Prefix Then hn.FakeName := Name SetName hn.RealName EndIf EndIf Next EndSub % Swap out ship names. This will name all ships with "fake" % names. Sub hn.SwapOutShipNames If hn.Terminated Then Return ForEach Ship Do If Owner$=My.Race$ Then If IsEmpty (hn.FakeName) Then hn.FakeName := hn.Prefix Do hn.FakeName := hn.FakeName & Random(0,10000) Loop While Len(hn.FakeName) < 16 EndIf hn.RealName := Name SetName hn.FakeName EndIf Next EndSub % Terminate name hiding. Sub hn.Terminate hn.Terminated := True % This is an explicit `For' loop to remove the properties of % non-existing (destroyed) ships, too. For i:=1 To 999 Do Ships(i).hn.RealName := Ships(i).hn.FakeName := z(0) EndSub On Load Do hn.SwapInShipNames On Exit Do hn.SwapOutShipNames