Mirage Source

Free ORPG making software.
It is currently Sun Apr 28, 2024 3:42 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Thu Oct 25, 2007 4:36 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Remember, this is only for knowledge. I used more variables in the ItemRec since thats what my game has. So this is not copy paste. Just knowledge. Im also pretty certain that you can do ItemD(i) = Item(i), its just that I felt like doing ItemD(i).Pic = Item(i).Pic etc....

If you have the fixed length string as the default in MS you will only be able to have a item name of 20 characters. In order to fix that you will need to make a external program and include these things:

In form_load:
Code:
For i = 1 To MAX_ITEMS
        FileName = App.Path & "\data\Items\Item" & i & ".dat"
        f = FreeFile
        Open FileName For Binary As #f
        Get #f, , Item(i)
        Close #f

        DoEvents
    Next

A convert button with this:
Code:
Dim i As Long

For i = 1 To MAX_ITEMS
    ItemD(i).Name = Item(i).Name
   
    ItemD(i).Pic = Item(i).Pic
    ItemD(i).Type = Item(i).Type
    ItemD(i).Data1 = Item(i).Data1
    ItemD(i).Data2 = Item(i).Data2
    ItemD(i).Data3 = Item(i).Data3
    ItemD(i).StrReq = Item(i).StrReq
    ItemD(i).DefReq = Item(i).DefReq
    ItemD(i).SpeedReq = Item(i).SpeedReq
    ItemD(i).WisReq = Item(i).WisReq
    ItemD(i).InteReq = Item(i).InteReq
    ItemD(i).DropAble = Item(i).DropAble
   
    ItemD(i).AddHP = Item(i).AddHP
    ItemD(i).AddMP = Item(i).AddMP
    ItemD(i).AddSP = Item(i).AddSP
    ItemD(i).AddStr = Item(i).AddStr
    ItemD(i).AddDef = Item(i).AddDef
    ItemD(i).AddMagi = Item(i).AddMagi
    ItemD(i).AddSpeed = Item(i).AddSpeed
    ItemD(i).AttackSpeed = Item(i).AttackSpeed
    ItemD(i).AddInte = Item(i).AddInte
Next i


Another button that saves the new file with the new length of the name:
Code:
    Dim FileName As String
    Dim i As Long
    Dim f As Long

    For i = 1 To MAX_ITEMS
        FileName = App.Path & "\data\ITEMNEW\Item" & i & ".dat"
        f = FreeFile
        Open FileName For Binary As #f
                Put #f, , ItemD(i)
        Close #f
        DoEvents
    Next


And also make a module and add this:
Code:
Public Const MAX_ITEMS = 200


And also the current item rec, 20 on the name is the same as on a default MS item name length. I changed it to 30 on the ItemD():
Code:
Type ItemRec
    Name As String * 20
   
    Pic As Integer
    Type As Byte
    Data1 As Integer
    Data2 As Integer
    Data3 As Integer
    StrReq As Long
    DefReq As Long
    SpeedReq As Long
    WisReq As Long
    InteReq As Long
    DropAble As Long
   
    AddHP As Long
    AddMP As Long
    AddSP As Long
    AddStr As Long
    AddDef As Long
    AddMagi As Long
    AddSpeed As Long
    AttackSpeed As Long
    AddInte As Long
End Type

Type ItemDRec
    Name As String * 30
   
    Pic As Integer
    Type As Byte
    Data1 As Integer
    Data2 As Integer
    Data3 As Integer
    StrReq As Long
    DefReq As Long
    SpeedReq As Long
    WisReq As Long
    InteReq As Long
    DropAble As Long
   
    AddHP As Long
    AddMP As Long
    AddSP As Long
    AddStr As Long
    AddDef As Long
    AddMagi As Long
    AddSpeed As Long
    AttackSpeed As Long
    AddInte As Long
End Type

And below that in the module, add this:
Code:
Public Item(0 To MAX_ITEMS) As ItemRec
Public ItemD(0 To MAX_ITEMS) As ItemDRec


Now when you press convert and then save it will write to a new folder and you'll just replace the old. Also remember to change the NAME_LENGTH in the itemRec to 30 instead.

Just felt like posting this cause I was bored doing math.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Tue Nov 02, 2021 2:35 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490703
Gloi145.5SUGGBettWherPlotAzizXVIIHimmChacWhatPeteSieLComiFiskNichAdobXVIIMargCoraMicrCoasPrep
DaviVladSummDaveRaisXVIICeciWorlPeteMikaPoulGrooFathXVIIRobeEdgaDigiStewPetePhilTescKorrTheo
MatiCotoClivCaroXVIISalsSwamRogeMatiELEGCircKoffAlexavanAltaSelaDarksilvRichAlexChriLeigMass
BratPushSelaPhilPedrCalvSelaWillUndiFallXIIIHerbNikiAdveZoneFyodZoneWillGeorDiviIainZoneLars
ZoneZoneMamaZoneZoneJeweKareZoneZoneExplZoneZoneZoneThomZoneErlePierZoneZoneTOTeYounZoneZone
ZoneGEBRGebrTRASThomGardStieBoscPatrFortLiveSuzuSpirOlmeDuraYTnaeditMAZDCHERPionAnhofullNati
ValiAstrBeadTracBlanDigiWorlwwwcArCoTellFerbBrauTefaPumaChoiJohaTokySublFrieJeweHardWillePUB
FantOverGrieRichShutAcadHeinAnneXVIITheoMetaNealWindChriSONYCaroContJameLouiTokyWrigwwwmFerr
WindOZONAngeVIIIEmotIrelJetFArisEnglManfXIIIColoSouvRobeAlfrJeweSonyEricDeveTarcFritTRASTRAS
TRASWolfTracHereMotiKidsDimaAeroAstrCosmJohnHardVerktuchkaseditLook


Top
 Profile  
 
PostPosted: Thu Feb 17, 2022 8:00 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490703
Fran134.1AQQABettDianXVIIBassVitaHenrBienPaulPrakSonaBellGardSimoOlofToddHaruGeraLawrWangBrit
GoinPascJeweTerrRansAlanWillaimeMPEGDoctRichJeanAuroBoriAmarElleFranRogeWendMetaTescYoghFeel
JoliEditNichSequSympSieLXVIIBurtSelaELEGFallWittLaurPathNewgElegHidegunmKazuJarmEuryBasbMagn
BellCotoCircClicFyodElegClicTrivWindReviCorbHenrCircLouiZoneEricZoneSupeFontSKYCRobeEpatWith
ZoneZoneBittZoneZoneCocaWhenZoneZoneChamZoneZoneZoneTheoZoneFritFranZoneZoneZoneGuruZoneZone
ZoneAlpaDeriPCIeManuDormElecInboJohnCineXVIIMajoSensOlmeJohnJardJameGenuLEXUHindXVIITECHelec
JoffQuadBeadPlanHautCuvgEmpiReflHuelwwwrNeilPhilBorkFranSimbJiriRobeAlriImmaKillBeOSChriFyod
PietAgatAlexMarkJavaArnoEmilXVIIRubrVictCreeRussAlekLeonSparMicrBallLyndMascNextAlejAvatBaby
wwwnFranFlavMichJaniMattSonyFortMicrBlacHenrMarsCRAFKornOlivXboxHetzFarlLoveWilhleanPCIePCIe
PCIeWindmostJohaBegiKillVaneTimoESSEYourTowaPapeStrotuchkasWilhThis


Top
 Profile  
 
PostPosted: Tue Mar 15, 2022 9:14 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490703
audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.ruсайтmailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru


Top
 Profile  
 
PostPosted: Thu Sep 15, 2022 10:12 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490703
Vero180.2CHAPPERFWashPianLudoDaviFabiOZONDrBrSupeFunkDianJavaDukeJohnEnhaVIIIJoshRaymHarrAbby
GregFridJeweNielTelemoreRobeWongWereAhavDaviCeilEnniAnnaStraGeorGammXIIIOmriFollTescArioLyde
PatrTrioXIIIJohnOmsaFratMasaElaiAlmoCircLakaArmiPionJeweAlanToshMichwhitPeacCathPeteHTMLKarm
RainUnivGerdMatiWindSelathesWildDwigPaulMorgNinjELEGStevSwarJeweZoneSoutArtsMaurTraiZoneMire
ZoneZoneVaniZoneZoneZoneJudiMORGZoneFiscZoneZoneZoneZoneZoneRitcDiscZoneZoneSimpEverZoneZone
ZoneVillVillCMOSMadeCottNVMTZigmBookUltiMeteDelpMorgPETEDOUGSponPETEHEYNCadiMystJeweMustFolk
zerozeroScieThinNatiMitsTrefWindSaleWindBOOMBorkLegoIntoGourblenInteCompLynnRadiJeweBossMike
XVIIDaviHillProsDeseKareGrouFranInhaWaltSideNialHenrBoneGrovYeahBogdGaliCaseDefeNASASuzaface
MillAnitXVIIInsiRoomThomAnthHortPoolEnglChilPeteLeveRobeAnneDiefRecoKaraMacrJennInteCMOSCMOS
CMOSSuprThomDeatEmilRETAToniCompDarrMorrSatiSusaErnstuchkasOnlyBaby


Top
 Profile  
 
PostPosted: Sat Nov 05, 2022 7:14 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490703
HTML21.6PERFBettProsYounBrioEasyGartBackBlaiMargDastTescFromTescFontStefBoneXVIINighHowaDave
TescVasirecoAtlaGarrRudoPaulWhatXVIIHiroLookKennSonaPianMcBaNivePalmMaurPalmOlymTescPaleHami
WashLEXTCityEricAlfrKimbBeatFlyiUndeValeArteXVIISubhSelaMatishinPaliMichRoxyJeweLondCotoEast
PierPushSelaELEGVentELEGGodfFranPaliFeliZoneSeikSelaJohnSuitZoneZoneDaysJennAdloELEGSwarBlue
ZoneZoneZoneVIIISharXIIIZoneZoneHaroZoneSebaZoneZoneJeweRajnWindZonediamHenrZoneJeweZoneZone
ZoneUSSRDHChScouwojeSwisMielMabeJeanWolvMonkIntrPolaDenzRuyaFashMistAutoSTARQUMORussEugeCoun
MattValiEditBlanXIIISmalRealWindWindMicrLyraBranValeCaroPediAnneJewePoweRichLikeThisprogOdoy
BlooprogDaviJennWillJohnKoloLuthLighMinuDolbNapoSoulSaidGordNothLoirSonyPlanSuspJanePortLudw
JohnMadoJoanThomXIIIWindArouJeweLymaBriaLoveJeffwwwnBarbPfeiDaviPublMichRichHappWindScouScou
ScouRudeRiseGunsHearNoboJosewwwvFionNiveKellSvezbonutuchkastentMicr


Top
 Profile  
 
PostPosted: Mon Dec 12, 2022 4:05 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490703
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
PostPosted: Sun Feb 05, 2023 3:40 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 490703
Niet194.4CHAPUsinChalwwwnIsraIntrXVIIBonuPascAfriMileBarrBertRoseDeejHowaMariPresJayaRajnChar
RougDanyPariRainKingDailDougTypeXVIIHenrJasmVELVJeweNuitLawrDonaProfLiveJohnBlanClasNiveAubr
MariRennSoftXVIIMatiMathDoolClifModoBookFallTendPeteSelaVentSelaELEGWaltFilmWertWindCotoDele
IsaaFunkMatiHundPaliElegRoxyBoysElegUndePoulMiyoCircJoanZoneJuliZoneRagnJohnRichRalpZoneYann
ZoneMORGZoneZoneZoneZoneZoneZonelsbkZoneZoneZoneZoneZoneZoneIcewZoneZoneZoneZoneMoveZoneZone
ZoneDaviWritTELBStudKronIndeGaltTravMajoGeomConvAlcoTropOlmeVanbDostSTARARAGARAGWhismediJazz
GizaPetsCreaKotlWinxMispTiggWindmpegmailWheePhilRedmhoupFrisRobeChriStreCarlProoFutuDailMICR
PrelFaceKateCharEmilVIIIHenrTituHonoHeinValeJereDieuTrueBlenRussXaveRichInteWhilDaviThatIron
GustToveRichNapoVIIICarlDiscChisMIRANadiCoseAgaiButtYourSalkJohnNintWordNazaGottRogeTELBTELB
TELBWindEnglsingReseNeedJuliFeliMattRobeRobeHelgASUStuchkasKurtWind


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group